Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
  Frequently Asked Questions
 [Collapse]API Reference
  [Expand]DevExpress.EasyTest.Framework
  [Expand]DevExpress.ExpressApp
  [Expand]DevExpress.ExpressApp.Actions
  [Expand]DevExpress.ExpressApp.AuditTrail
  [Expand]DevExpress.ExpressApp.Chart
  [Expand]DevExpress.ExpressApp.Chart.Web
  [Expand]DevExpress.ExpressApp.Chart.Win
  [Expand]DevExpress.ExpressApp.CloneObject
  [Expand]DevExpress.ExpressApp.ConditionalAppearance
  [Expand]DevExpress.ExpressApp.Dashboards
  [Expand]DevExpress.ExpressApp.Dashboards.Web
  [Expand]DevExpress.ExpressApp.Dashboards.Win
  [Expand]DevExpress.ExpressApp.Data
  [Expand]DevExpress.ExpressApp.DC
  [Expand]DevExpress.ExpressApp.DC.ClassGeneration
  [Collapse]DevExpress.ExpressApp.Editors
   [Expand]ActionContainerViewItem Class
   [Expand]ColumnsListEditor Class
   [Expand]CreateCustomModelSynchronizerEventArgs Class
   [Expand]CriteriaObjectTypeMemberAttribute Class
   [Expand]CriteriaOptionsAttribute Class
   [Expand]DashboardViewItem Class
    EditMaskType Enumeration
   [Expand]EditorAliases Structure
   [Expand]EditorDescriptorsFactory Class
   [Expand]IAppearanceEnabled Interface
   [Expand]IAppearanceFormat Interface
   [Expand]IAppearanceVisibility Interface
   [Expand]IComplexControl Interface
   [Expand]IComplexListEditor Interface
   [Expand]IComplexViewItem Interface
   [Expand]IModelRegisteredPropertyEditor Interface
   [Expand]IModelRegisteredPropertyEditors Interface
   [Expand]IModelRegisteredViewItem Interface
   [Expand]IModelRegisteredViewItems Interface
   [Expand]INotifyAppearanceVisibilityChanged Interface
   [Expand]ListEditor Class
   [Collapse]ListEditorAttribute Class
     ListEditorAttribute Members
    [Expand]ListEditorAttribute Constructor
    [Expand]ListEditorAttribute Properties
   [Expand]ModelRegisteredViewItemsGenerator Class
   [Expand]PropertyEditor Class
   [Expand]PropertyEditorAttribute Class
    StaticHorizontalAlign Enumeration
   [Expand]StaticImage Class
   [Expand]StaticText Class
    StaticVerticalAlign Enumeration
    ViewEditMode Enumeration
   [Expand]ViewItem Class
   [Expand]ViewItemAttribute Class
    ViewItemVisibility Enumeration
  [Expand]DevExpress.ExpressApp.EF
  [Expand]DevExpress.ExpressApp.EF.Utils
  [Expand]DevExpress.ExpressApp.FileAttachments.Web
  [Expand]DevExpress.ExpressApp.FileAttachments.Win
  [Expand]DevExpress.ExpressApp.Filtering
  [Expand]DevExpress.ExpressApp.HtmlPropertyEditor.Web
  [Expand]DevExpress.ExpressApp.HtmlPropertyEditor.Win
  [Expand]DevExpress.ExpressApp.Kpi
  [Expand]DevExpress.ExpressApp.Layout
  [Expand]DevExpress.ExpressApp.Maps.Mobile
  [Expand]DevExpress.ExpressApp.Maps.Mobile.Editors
  [Expand]DevExpress.ExpressApp.Maps.Web
  [Expand]DevExpress.ExpressApp.Maps.Web.Helpers
  [Expand]DevExpress.ExpressApp.MiddleTier
  [Expand]DevExpress.ExpressApp.Mobile
  [Expand]DevExpress.ExpressApp.Mobile.Editors
  [Expand]DevExpress.ExpressApp.Mobile.MobileModel
  [Expand]DevExpress.ExpressApp.Mobile.SystemModule
  [Expand]DevExpress.ExpressApp.Mobile.Templates
  [Expand]DevExpress.ExpressApp.Model
  [Expand]DevExpress.ExpressApp.Model.Core
  [Expand]DevExpress.ExpressApp.Model.NodeGenerators
  [Expand]DevExpress.ExpressApp.ModelEditor
  [Expand]DevExpress.ExpressApp.Notifications
  [Expand]DevExpress.ExpressApp.Notifications.Web
  [Expand]DevExpress.ExpressApp.Notifications.Win
  [Expand]DevExpress.ExpressApp.PivotChart
  [Expand]DevExpress.ExpressApp.PivotChart.Web
  [Expand]DevExpress.ExpressApp.PivotChart.Win
  [Expand]DevExpress.ExpressApp.PivotGrid
  [Expand]DevExpress.ExpressApp.PivotGrid.Web
  [Expand]DevExpress.ExpressApp.PivotGrid.Win
  [Expand]DevExpress.ExpressApp.Reports
  [Expand]DevExpress.ExpressApp.Reports.Web
  [Expand]DevExpress.ExpressApp.Reports.Win
  [Expand]DevExpress.ExpressApp.ReportsV2
  [Expand]DevExpress.ExpressApp.ReportsV2.Web
  [Expand]DevExpress.ExpressApp.ReportsV2.Win
  [Expand]DevExpress.ExpressApp.Scheduler
  [Expand]DevExpress.ExpressApp.Scheduler.Web
  [Expand]DevExpress.ExpressApp.Scheduler.Win
  [Expand]DevExpress.ExpressApp.ScriptRecorder
  [Expand]DevExpress.ExpressApp.ScriptRecorder.Web
  [Expand]DevExpress.ExpressApp.ScriptRecorder.Win
  [Expand]DevExpress.ExpressApp.Security
  [Expand]DevExpress.ExpressApp.Security.Adapters
  [Expand]DevExpress.ExpressApp.Security.ClientServer.Wcf
  [Expand]DevExpress.ExpressApp.Security.EF.Adapters
  [Expand]DevExpress.ExpressApp.Security.Strategy
  [Expand]DevExpress.ExpressApp.Security.Xpo.Adapters
  [Expand]DevExpress.ExpressApp.StateMachine
  [Expand]DevExpress.ExpressApp.SystemModule
  [Expand]DevExpress.ExpressApp.Templates
  [Expand]DevExpress.ExpressApp.Templates.ActionContainers
  [Expand]DevExpress.ExpressApp.TreeListEditors
  [Expand]DevExpress.ExpressApp.TreeListEditors.Web
  [Expand]DevExpress.ExpressApp.TreeListEditors.Win
  [Expand]DevExpress.ExpressApp.Updating
  [Expand]DevExpress.ExpressApp.Utils
  [Expand]DevExpress.ExpressApp.Validation
  [Expand]DevExpress.ExpressApp.Validation.Web
  [Expand]DevExpress.ExpressApp.Validation.Win
  [Expand]DevExpress.ExpressApp.ViewVariantsModule
  [Expand]DevExpress.ExpressApp.Web
  [Expand]DevExpress.ExpressApp.Web.Controls
  [Expand]DevExpress.ExpressApp.Web.Editors
  [Expand]DevExpress.ExpressApp.Web.Editors.ASPx
  [Expand]DevExpress.ExpressApp.Web.SystemModule
  [Expand]DevExpress.ExpressApp.Web.Templates
  [Expand]DevExpress.ExpressApp.Web.Utils
  [Expand]DevExpress.ExpressApp.Win
  [Expand]DevExpress.ExpressApp.Win.Core
  [Expand]DevExpress.ExpressApp.Win.Editors
  [Expand]DevExpress.ExpressApp.Win.Model
  [Expand]DevExpress.ExpressApp.Win.SystemModule
  [Expand]DevExpress.ExpressApp.Win.Templates
  [Expand]DevExpress.ExpressApp.Win.Templates.Navigation
  [Expand]DevExpress.ExpressApp.Workflow
  [Expand]DevExpress.ExpressApp.Workflow.Win
  [Expand]DevExpress.ExpressApp.Xpo
  [Expand]DevExpress.ExpressApp.Xpo.Utils
  [Expand]DevExpress.Persistent.Base
  [Expand]DevExpress.Persistent.Base.General
  [Expand]DevExpress.Persistent.Base.ReportsV2
  [Expand]DevExpress.Persistent.Base.Security
  [Expand]DevExpress.Persistent.BaseImpl
  [Expand]DevExpress.Persistent.BaseImpl.EF
  [Expand]DevExpress.Persistent.BaseImpl.EF.PermissionPolicy
  [Expand]DevExpress.Persistent.BaseImpl.PermissionPolicy
  [Expand]DevExpress.Persistent.Validation
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

ListEditorAttribute Class

Applied to a custom List Editor. Registers the List Editor in the application and specifies the object type for which the List Editor is intended.

Namespace:DevExpress.ExpressApp.Editors
Assembly:DevExpress.ExpressApp.v17.2.dll

Expanded Syntax

Expanded Remarks

When you implement a custom List Editor, it should then be available in the Application Model, so that you can use it for a List View. When the application is loaded, the reflection mechanism finds all the classes decorated with the ListEditorAttribute class, and adds them to the list of available List Editors. So, you can select your List Editor as a value of the Views | <ListView> node's IModelListView.EditorType property. Apply the ListEditorAttribute with the ListElementType parameter to the List Editor declaration to specify that your List Editor is designed only for a certain object type. Set ListElementType to System.Object to specify that your List Editor can display objects of any type.

Note

The approach described in this topic uses the reflection mechanism, which collects information on the types decorated by the ListEditorAttribute or PropertyEditorAttribute. It is the recommended way to register your List Editor, but if you want to speed up your application start, switch off this mechanism by overriding the ModelBase.RegisterEditorDescriptors method. Refer to the ModuleBase class description to learn more about this method.

The ListEditorAttribute attribute has several parameters. So, you have the following options:

  • You want your List Editor to be automatically set for all List Views for which another specific Editor was not applied (the GridListEditor and ASPxGridListEditor are used by default). In this instance, pass the Object type as the attribute's parameter. Note that you can also set your List Editor as default to the IModelViews.DefaultListEditor property of the Views Model Editor node.

    Set the defaultEditor parameter to false to add this List Editor to the IModelViews.DefaultListEditor list.

  • You want your List Editor to be automatically set for List Views of a particular data type. In this instance, pass the required object type as the attribute's parameter. As a result, the IModelClass.EditorType property is set to your List Editor and your List Editor is used as the default one for objects of that data type. Note that your List Editor might not be used automatically as a default if there is another List Editor that uses this attribute with the same parameter.

  • You implement an extra List Editor for a particular object type, but you do not want it to be automatically set for List Views of this object type. However, you need to be able to set it for List Views when required. In this instance, pass the required object type as the first attribute parameter; and false as the second attribute parameter. In this instance, your List Editor is added to the IModelClass.EditorType list of editors available for List Views of the specified data type.

Also, you can register a List Editor with an alias using the alias parameter. This allows you to specify one alias for the ASP.NET and WinForms List Editors and set this alias to the DefaultListEditor or EditorType property in a Model Editor with platform-agnostic settings. So, these List Editors are applied to the corresponding platform-dependent List View automatically and you do not need to specify these Editors individually for each platform.

To see an example of using this attribute, refer to the How to: Implement a Custom WinForms List Editor and How to: Implement an ASP.NET Web List Editor Using a Custom Control help topics.

When implementing a Property Editor, use PropertyEditorAttribute.

Expanded Inheritance Hierarchy

System.Object
    System.Attribute
       ListEditorAttribute

Expanded See Also

How would you rate this topic?​​​​​​​