Skip to main content

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

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.LinqServerModeSource.bmp")]
public class LinqServerModeSource :
    Component,
    IListSource,
    ISupportInitialize,
    ILinqServerModeFrontEndOwner,
    IDXCloneable,
    IXtraSourceError

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