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

XafApplication.CreateListEditor(CollectionSourceBase, IModelListView) Method

Creates the List Editor which is specified in the appropriate Application Model node.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public ListEditor CreateListEditor(
    CollectionSourceBase collectionSource,
    IModelListView modelListView
)

Parameters

Name Type Description
collectionSource CollectionSourceBase

A CollectionSourceBase object representing the Collection Source of the List View which is displayed via the new ListEditor object.

modelListView IModelListView

An IModelListView object representing the Application Model node that defines the List View for which a List Editor is created.

Returns

Type Description
ListEditor

An appropriate List Editor.

Remarks

This method creates the List Editor of the type specified by the IModelListView.EditorType property of the Views | <ListView> node which is passed as the info parameter. If the List View cannot be created, an exception is raised.

A List Editor can implement the IComplexListEditor and/or IProtectedContentEditor interface. If the IComplexListEditor interface is implemented, its Setup method is called. If the IProtectedContentEditor interface is implemented, its ProtectedContentText property is set to the Application node’s IModelApplication.ProtectedContentText property value.

You may need to use this method if a custom Property Editor displays its value via a List View. In this instance, use the List View’s constructor with the listEditor parameter (see XafApplication.CreateListView).

See Also