.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.ListViewCreating Event

Occurs when creating a List View.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll


public event EventHandler<ListViewCreatingEventArgs> ListViewCreating
Public Event ListViewCreating As EventHandler(Of ListViewCreatingEventArgs)

Event Data

The ListViewCreating event's data class is ListViewCreatingEventArgs. The following properties provide information specific to this event:

Property Description
CollectionSource Returns the collection source to be used when creating a new List View.
IsRoot Indicates whether a root View must be created. Inherited from ViewCreatingEventArgs.
ObjectSpace Returns the Object Space to be used when creating a new View. Inherited from ViewCreatingEventArgs.
View Specifies a custom List View created in a XafApplication.ListViewCreating event.
ViewID Returns the ID of the created View. Inherited from ViewCreatingEventArgs.


Handle this event to provide a custom List View instead of a default one. Use the handler's ListViewCreatingEventArgs.View parameter to get information on the created List View. To do this, use the application's XafApplication.FindModelView method passing the View ID as a parameter. To create a List View, use the collection source passed as the handler's ListViewCreatingEventArgs.CollectionSource parameter. To specify whether the List View is root, use the handler's ViewCreatingEventArgs.IsRoot parameter.

See Also