Skip to main content

LinqServerModeDataSource Class

A data source that can be associated with any queryable source.

Namespace: DevExpress.Data.Linq

Assembly: DevExpress.Web.v24.2.dll

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:

  1. Use the LinqServerModeDataSource.ContextTypeName property to specify the type of objects retrieved from a data source.

  2. Use the LinqServerModeDataSource.TableName property to specify the table name.

  3. 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" />

Online Examples

View Example: How to use ASPxGridLookup two-way bound to LinqServerModeDataSource in GridViewDataComboBoxColum

View Example: An editable ASPxGridView in LINQ Server Mode

Inheritance

Object
Control
DataSourceControl
LinqServerModeDataSource
See Also