Back to Devexpress

LinqServerModeDataSource Class

aspnet-devexpress-dot-data-dot-linq.md

latest4.4 KB
Original Source

LinqServerModeDataSource Class

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

Namespace : DevExpress.Data.Linq

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class LinqServerModeDataSource :
    DataSourceControl
vb
Public Class LinqServerModeDataSource
    Inherits 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.

aspx
<%@ 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

Implements

IComponent

IDisposable

IParserAccessor

IUrlResolutionService

IDataBindingsAccessor

IControlBuilderAccessor

IControlDesignerAccessor

IExpressionsAccessor

IDataSource

IListSource

Inheritance

Object Control DataSourceControl LinqServerModeDataSource

See Also

LinqServerModeDataSource Members

ASPxGridView

Bind Grid View to Large Data (Database Server Mode)

ASPxPivotGrid

Database Server Mode

EntityServerModeDataSource

DevExpress.Data.Linq Namespace