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.v19.2.dll

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.LinqServerModeSource.bmp")]
public class LinqServerModeSource :
    Component,
    IListSource,
    ISupportInitialize,
    ILinqServerModeFrontEndOwner,
    IDXCloneable
<ToolboxBitmap(GetType(ResFinder), "Bitmaps256.LinqServerModeSource.bmp")>
Public Class LinqServerModeSource
    Inherits Component
    Implements 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.

Inheritance

See Also