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

VirtualServerModeSource Class

A data source that features event-based data operations: async data load, sorting, filtering and infinite scrolling through records (in a bound Windows Forms GridControl).

Namespace: DevExpress.Data

Assembly: DevExpress.Data.v18.2.dll

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.VirtualServerModeSource.bmp")]
[ToolboxTabName("DX.18.2: Data & Analytics")]
public class VirtualServerModeSource :
    Component,
    IListSource,
    ISupportInitialize

Remarks

The VirtualServerModeSource is an event-based data source for a Windows Forms Data Grid (GridControl). The events the data source provides allow you to asynchronously load data in batches, while taking into account a bound grid control’s sort and filter configuration.

A Data Grid bound to a VirtualServerModeSource supports infinite scrolling. On startup, the Data Grid fetches an initial batch of records from the data source. The control does not know the total number of records in the data source and thus, its scroll bar always reflects the current number of loaded rows. Once an end-user scrolls to the last loaded record, the grid requests an additional batch of records and adjusts its scroll bar to match the new loaded record count.

InfiniteScrolling2.gif

Note

Data grouping is not supported in a Data Grid control when it is bound to a VirtualServerModeSource.

The following are two main events the VirtualServerModeSource provides:

  • VirtualServerModeSource.ConfigurationChanged -

    Fires on initial data load and reload in the bound grid control, and when the data grid’s sort and filter configuration changes. Allows you to initialize the data source and (optionally) return an initial batch of records.

  • VirtualServerModeSource.MoreRows - Fires when a bound grid control asks the data source for a new batch of rows.

Additional events allow you to control data shaping operations invoked in the bound grid control and enable CRUD operations:

At design time, to create columns in a bound grid control for fields the VirtualServerModeSource provides, specify the VirtualServerModeSource.RowType property.

Demo: Infinite Scrolling module in the XtraGrid MainDemo

Inheritance

Object
MarshalByRefObject
Component
VirtualServerModeSource
See Also