LinqServerModeDataSource Class
A data source that can be associated with any queryable source.
Namespace: DevExpress.Data.Linq
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
#Declaration
public class LinqServerModeDataSource :
DataSourceControl
#Remarks
The LinqServerModeDataSource
component allows you to bind the ASPxGridView, ASPxCardView, ASPxVerticalGrid, ASPxGridLookup, ASPxComboBox, and ASPxPivotGrid controls to a data source via LinqToSQL, and enable the database server mode. To do this, follow the steps below:
Use the LinqServerModeDataSource.ContextTypeName property to specify the type of objects retrieved from a data source.
Use the LinqServerModeDataSource.TableName property to specify the table name.
Bind the control to the
LinqServerModeDataSource
component.
Note that the LinqServerModeDataSource
component requires the DevExpress.Data.Linq namespace.
<%@ Register Assembly="DevExpress.Web.vXX.Y, Version=XX.Y.ZZ.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<dx:ASPxGridView ID="ASPxGridView1" DataSourceID="LinqServerModeDataSource1" >
</dx:ASPxGridView>
<dx:LinqServerModeDataSource ID="LinqServerModeDataSource1" runat="server"
ContextTypeName="NorthwindNestedFields.DataClasses1DataContext" TableName="Orders" />