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.v22.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
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) {
//...
}
}