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.v24.2.dll
NuGet Package: DevExpress.Data
Declaration
[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.WcfServerModeSource.bmp")]
public class WcfServerModeSource :
Component,
IListSource,
ISupportInitialize,
IWcfServerModeFrontEndOwner,
IDXCloneable,
IXtraSourceError
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.