LINQ at Runtime

jqGrid for ASP.NET fully supports LINQ, either through the declarative LinqDataSource control, or directly, by binding to LINQ data directly through the IQuerable interface. Remember to explicitly define the columns.

Example:

<trirand:JQGrid runat="server" ID="LinqAtRuntimeGrid"> <Columns> <trirand:JQGridColumn DataField="CustomerID" /> <trirand:JQGridColumn DataField="CompanyName" /> <trirand:JQGridColumn DataField="ContactName" /> <trirand:JQGridColumn DataField="ContactTitle" /> </Columns> </trirand:JQGrid>

UserDataClassesDataContext data = new UserDataClassesDataContext(); LinqAtRuntimeGrid.DataSource = data.Users; LinqAtRuntimeGrid.DataBind();


  Last Updated: 11/11/2009 | © Trirand, 2009