corelibraries-devexpress-dot-data-dot-virtualservermodesource-c77d4ff7.md
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.v25.2.dll
NuGet Package : DevExpress.Data
public event EventHandler<VirtualServerModeAcquireInnerListEventArgs> AcquireInnerList
Public Event AcquireInnerList As EventHandler(Of VirtualServerModeAcquireInnerListEventArgs)
The AcquireInnerList event's data class is DevExpress.Data.VirtualServerModeAcquireInnerListEventArgs.
The AcquireInnerList event fires on the VirtualServerModeSource initialization. Handle this event to do the following:
VirtualServerModeSource automatically saves data rows once you supply them within the VirtualServerModeSource.ConfigurationChanged and/or VirtualServerModeSource.MoreRows event handlers;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; }
}
Imports System.ComponentModel
Imports DevExpress.Data
Private cache As New BindingList(Of [MyClass])()
Private Sub virtualServerModeSource1_AcquireInnerList(ByVal sender As Object, ByVal e As VirtualServerModeAcquireInnerListEventArgs)
e.InnerList = cache
End Sub
Public Class [MyClass]
Public Property ID() As Integer
Public Property Name() As String
End Class
See Also