VirtualServerModeSource.AcquireInnerList Event
This event can be handled to provide an inner list that will be storage for rows fetched using the VirtualServerModeSourceās events. To enable CRUD operations in a bound Data Grid, you need to provide an inner list that supports these operations. If no inner list is supplied (or you do not handle the AcquireInnerList event), CRUD operations are disabled in the grid control.
Namespace: DevExpress.Data
Assembly: DevExpress.Data.v24.1.dll
NuGet Package: DevExpress.Data
Declaration
Event Data
The AcquireInnerList event's data class is DevExpress.Data.VirtualServerModeAcquireInnerListEventArgs.
Remarks
The AcquireInnerList
event fires on the VirtualServerModeSource initialization. Handle this event to do the following:
- specity an inner list to which the
VirtualServerModeSource
automatically saves data rows once you supply them within the VirtualServerModeSource.ConfigurationChanged and/or VirtualServerModeSource.MoreRows event handlers; - specify functions to perform on batches of data rows before adding them to the inner list;
- specify an action to perform after the
VirtualServerModeSource
is disposed of.
If the inner list supports CRUD operations, these operations are available in the bound Data Grid control. If the inner list is not specified, CRUD operations are not allowed.
using System.ComponentModel;
using DevExpress.Data;
BindingList<MyClass> cache = new BindingList<MyClass>();
private void virtualServerModeSource1_AcquireInnerList(object sender, VirtualServerModeAcquireInnerListEventArgs e) {
e.InnerList = cache;
}
public class MyClass {
public int ID { get; set; }
public string Name { get; set; }
}