Skip to main content
A newer version of this page is available. .

WcfServerModeSource Class

The data source for the GridControl and SearchLookUpEdit controls that binds these controls to a WCF Data Service in Server Mode.

Namespace: DevExpress.Data.WcfLinq

Assembly: DevExpress.Data.v18.1.dll

Declaration

[ToolboxTabName("DX.18.1: Data & Analytics")]
[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.WcfServerModeSource.bmp")]
public class WcfServerModeSource :
    Component,
    IListSource,
    ISupportInitialize,
    IWcfServerModeFrontEndOwner,
    IDXCloneable

Remarks

Server mode allows a data-aware control to rapidly work with large datasets. Loading records in small portions on demand and performing data-aware operations on the data server side are the key features of server mode. When the control needs to display a specific portion of data, it calls a specific method of the bound server mode data source. This method sends a corresponding request to the data store, and upon receiving the results, passes them back to the control. The WcfServerModeSource component implements the IListSource interface, and can be used as a data source for a control supporting the server mode feature.

Use WcfServerModeSource to bind a server-mode enabled control to a WCF Data Service. Specify the type of objects contained in the query result using the WcfServerModeSource.ElementType property. Specify the required query request to a WCF Data Service via the WcfServerModeSource.Query property. Bind the control to the WcfServerModeSource component.


public MainWindow() {
    InitializeComponent();
    grid.DataSource = new WcfServerModeSource() {        
        KeyExpression = "CustomerID",
        Query = myDataServiceContext.Customers
    };
}

You can see a detailed example in the How to use the WcfServerModeSource component as a data source article.

Note

WcfServerModeSource is a read-only data source.

The following code snippets (auto-collected from DevExpress Examples) contain references to the WcfServerModeSource 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.

Inheritance

See Also