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]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
 [Expand]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
   [Collapse]ListEditor Class
     ListEditor Members
    [Expand]ListEditor Properties
    [Expand]ListEditor Events
    [Expand]ListEditor Methods
   [Expand]ListEditorAttribute Class
   [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.Editors
  [Expand]DevExpress.ExpressApp.Mobile.SystemModule
  [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.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]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

ListEditor Class

Represents the base class for List Editors.

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

Expanded Syntax

Expanded Remarks

List Views are visualized by means of List Editors. A List Editor has a control that is used to display an object collection supplied by a List View. The List Editor handles binding of its control and supports interaction between the List View and the control.

The List Editor that represents a specific List View can be accessed using the ListView.Editor property. The following code snippet demonstrates how to do this by handling the Controller.Activated and ViewController.ViewControlsCreated events:

By default, XAF uses two ListEditor class' descendants to visualize List Views: the GridListEditor is used in WinForms applications, and the ASPxGridListEditor is used in ASP.NET Web applications.

The base class for all List Editor types is the ListEditor. This class and its descendants can be used to implement custom List Editors. When deriving from the ListEditor class, the following protected members that are not described in the documentation can be overridden:

Member

When it is called

Description

AssignDataSourceToControlCalled in the CreateControls method and the DataSource property setter.This method is abstract. Override it to assign the current List Editor's data source to the control.
CreateControlsCoreCalled in the CreateControls method.This method is abstract. Override it to instantiate the List Editor's control.
OnAllowEditChangedCalled in the AllowEdit property setter.Raises the AllowEditChanged event. Call this method after the List Editor's edit mode has changed.
OnFocusedObjectChangingThis method is not called in the ListEditor class.Raises the FocusedObjectChanging event. Call this method before the focused object is changed in the List Editor's control.
OnFocusedObjectChangedThis method is not called in the ListEditor class.Raises the FocusedObjectChanged event. Call this method after the focused object is changed in the List Editor's control.
OnNewObjectAddingThis method is not called in the ListEditor class.Raises the NewObjectAdding event. Call this method before a new object is created in the List Editor's control.
OnNewObjectCanceledThis method is not called in the ListEditor class.Raises the NewObjectCanceled event. Call this method after creation of a new object is canceled in the List Editor's control.
OnNewObjectCreatedThis method is not called in the ListEditor class.Raises the NewObjectCreated event. Call this method after a new object is created in the List Editor's control.
OnProcessSelectedItemThis method is not called in the ListEditor class.Raises the ProcessSelectedItem event. Call this method when an object is selected in the List Editor's control and an end-user presses Enter or double-clicks the object.
OnSelectionChangedThis method is not called in the ListEditor class.Raises the SelectionChanged event. Call this method after the selection is changed in the List Editor's control.
OnSelectionTypeChangedThis method is not called in the ListEditor class.Raises the SelectionTypeChanged event. Call this method after the List Editor's supported selection type is changed.

Typical implementation of the ListEditor class' descendants comprises the following steps:

  1. Override the CreateControlsCore method. Create and configure an instance of the control that will represent a List View in a UI. Handle the control's events to call the following methods:

      - OnProcessSelectedItem

      - OnSelectionChanged

      - OnFocusedObjectChanging

      - OnFocusedObjectChanged

      - OnNewObjectAdding

      - OnNewObjectCanceled

      - OnNewObjectCreated

  2. Override the AssignDataSourceToControl method. Assign the List Editor's data source to its control.
  3. Override the Refresh method. Refresh data in the List Editor's control.
  4. Override the RequiredProperties property. Return business class' property names that are used by the List Editor when displaying objects. These properties are treated as displayable if a List View's data source is derived from the DevExpress.Xpo.XPBaseCollection.
  5. Override the SelectionType property. Return the selection type supported by the List Editor's control.
  6. Override the GetSelectedObjects method. Return a list of the selected objects.
  7. Override the FocusedObject method. Get and set the control's focused object.
  8. If the custom List Editor does not support server and/or data view mode (see List View Data Access Modes Overview), override the SupportsDataAccessMode property. It is also recommended that you implement a custom generator updater to disable unsupported modes for List Views visualized by the custom List Editor.
  9. Modify the constructor to instantiate the control that will represent the List Editor's pop-up menu. This control must implement the IDXPopupMenuHolder interface to support XAF architecture. Override the ContextMenuTemplate property to return the created instance of the control.
  10. Mark the custom List Editor with the ListEditorAttribute.

Note

To see an example of a List Editor derived from the ListEditor class, refer to the following topics:

Expanded Inheritance Hierarchy

System.Object
    ListEditor
       ASPxChartListEditor
       ASPxGridListEditor
       ASPxPivotGridListEditor
       ASPxSchedulerListEditor
       ASPxTreeListEditor
       CategorizedListEditor
       ChartListEditor
       ChartListEditorBase
       ColumnsListEditor
       ComplexWebListEditor
       GridListEditor
       MobileListEditor
       MobileMapsListEditor
       PivotGridListEditor
       PivotGridListEditorBase
       SchedulerListEditor
       SchedulerListEditorBase
       TreeListEditor
       WebMapsListEditor
       WebVectorMapsListEditor
       WinColumnsListEditor

Expanded See Also

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