The requested page is not available for the requested platform. You are viewing the content for Default platform.

EditorDescriptorsFactory.RegisterListEditorAlias(String, Type, IsClassCompatibleHandler) Method

Registers a List Editor's alias name and specifies the handler which provides a logic to choose if the alias is appropriate for the given type.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public void RegisterListEditorAlias(
    string aliasName,
    Type elementType,
    IsClassCompatibleHandler classHandler
)
Public Sub RegisterListEditorAlias(
    aliasName As String,
    elementType As Type,
    classHandler As IsClassCompatibleHandler
)

Parameters

Name Type Description
aliasName String

A string specifying the List Editor's alias name.

elementType Type

A Type object specifying the List Editor's target type.

classHandler DevExpress.ExpressApp.Editors.IsClassCompatibleHandler

The IsClassCompatibleHandler object which allows you to choose if the aliasName is appropriate for the elementType.

Remarks

The classHandler parameter is used if you want to register a number of editors for one type and choose the appropriate editor according to the logic implemented in it. In different situations, the editor satisfying the conditions will be applied to current type first.

public class MyModule : ModuleBase {
    //...
    protected override void RegisterEditorDescriptors(EditorDescriptorsFactory 
    editorDescriptorsFactory) {
        //...
        editorDescriptorsFactory.RegisterListEditorAlias("MyAlias", typeof(object), 
        IsCriteriaProperty); 
    }
    private static bool IsCriteriaProperty(IModelClass modelClass) {
        //...    
    }
}
See Also