LinqServerModeSource Class
The data source for the GridControl and PivotGridControl that binds these controls to any queryable source (e.g., ‘LINQ to SQL Classes’ or XPQuery<T>) in server mode.
Namespace: DevExpress.Data.Linq
Assembly: DevExpress.Data.v18.1.dll
Declaration
[ToolboxTabName("DX.18.1: Data & Analytics")]
[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.LinqServerModeSource.bmp")]
public class LinqServerModeSource :
Component,
IListSource,
ISupportInitialize,
ILinqServerModeFrontEndOwner,
IDXCloneable
Remarks
The LinqServerModeSource component allows you to bind the GridControl or PivotGridControl to an IQueryable query provider, and enable server mode. To do this, follow the steps listed below:
specify the key field name for objects retrieved from a data source using the LinqServerModeSource.KeyExpression property:
linqServerModeSource1.KeyExpression = "CustomerID";
specify the queryable source via the LinqServerModeSource.QueryableSource property. This property should be set in code:
public Form1() { InitializeComponent(); linqServerModeSource1.QueryableSource = new DataClasses1DataContext().Customers; }
- bind the control to the LinqServerModeSource component.
Note
The LinqServerModeSource is a read-only data source.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LinqServerModeSource class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.