Back to Devexpress

IComplexListEditor Interface

expressappframework-devexpress-dot-expressapp-dot-editors-246e0e6e.md

latest2.8 KB
Original Source

IComplexListEditor Interface

Declares members implemented by a List Editor to support receiving information on the application and Collection Source of the List View that uses the List Editor.

Namespace : DevExpress.ExpressApp.Editors

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public interface IComplexListEditor
vb
Public Interface IComplexListEditor

Remarks

In certain scenarios, a List Editor may require access to the application or the Collection Source of the List View that uses the List Editor. To get this information, the List Editor can implement the IComplexListEditor interface. This interface exposes a single IComplexListEditor.Setup method that passes this information to the List Editor.

When implementing a custom List Editor, support this interface if the List Editor requires information on the application and Collection Source to function properly.

Here is an example of how to implement IComplexListEditor in a ListEditor descendant.

csharp
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
// ...
public class CustomListEditor : ListEditor, IComplexListEditor {
    private CollectionSourceBase collectionSource;
    private XafApplication application;
    #region IComplexListEditor Members
    public void Setup(CollectionSourceBase collectionSource, 
XafApplication application) {
        this.collectionSource = collectionSource;
        this.application = application;
    }
    #endregion
    // Example:
    protected override object CreateControlsCore() {
        IList objectsCollection = collectionSource.List;
        // ...
    }
}

See Also

IComplexListEditor Members

XafApplication

CollectionSourceBase

ObjectSpace

IComplexViewItem

DevExpress.ExpressApp.Editors Namespace