Creates a List View used for the objects of the specified type, by default.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v18.2.dll
public ListView CreateListView(
IObjectSpace objectSpace,
Type objectType,
bool isRoot
)
Public Function CreateListView(
objectSpace As IObjectSpace,
objectType As Type,
isRoot As Boolean
) As ListView
Type | Name | Description |
---|---|---|
IObjectSpace | objectSpace | An IObjectSpace object representing the Object Space used to retrieve objects from the database to the created List View's Collection Source. |
Type | objectType | A Type object specifying the business object type. |
Boolean | isRoot | true, if the created List View is independent and owns the Object Space passed using the objectSpace parameter; false, if the created Detail View is nested to another root View that owns the Object Space. This value is assigned to the View.IsRoot property. |
Type | Description |
---|---|
ListView | A ListView object used to display the collection of objectType objects. |
If you need to create a List View using the information specified in the Application Model, use other CreateListView method overloads.
Pass true to the isRoot parameter if the created View should be the owner of the Object Space passed to the objectSpace parameter. If this Object Space already belongs to another View, pass false. Note that certain controllers and actions will be deactivated in this case. See View.IsRoot for additional information. To avoid this, create a new Object Space using the XafApplication.CreateObjectSpace or XafApplication.CreateNestedObjectSpace method and use it for the objectSpace parameter.
Do not use another View's View.ObjectSpace for the creation of a new root View in it. Instead, create a new Object Space using the XafApplication.CreateObjectSpace method for the new root View.