public class GridListEditor : WinColumnsListEditor, ISupportNewItemRowPosition, ISupportFooter, ILookupListEditor, IGridListEditorTestable, ILookupEditProvider, IRequireContextMenu, IRequireDXMenuManager, IConfigurableLookupListEditor, ISupportBorderStyle, ISupportFilterEditor
Public Class GridListEditor Inherits WinColumnsListEditor Implements ISupportNewItemRowPosition, ISupportFooter, ILookupListEditor, IGridListEditorTestable, ILookupEditProvider, IRequireContextMenu, IRequireDXMenuManager, IConfigurableLookupListEditor, ISupportBorderStyle, ISupportFilterEditor
List Editors are used by List Views to display object collections in a UI. The GridListEditor provides the most common data representation in the form of a two-dimensional table:
To display object collections, the GridListEditor uses an instance of the GridControl class as the underlying control.
The GridListEditor supports a wide range of features out of the box:
- Implements the IDataAwareExportable interface - the data-aware export type (ExportType) is used by default when exporting to Excel formats.
Implements the ISupportAppearanceCustomization interface - supports conditional appearance:
Implements the IDXPopupMenuHolder interface, and provides an ActionDX pop-up menu:
Implements the ISupportNewItemRowPosition interface - has a new item row. It allows end-users to create a new object directly in a List View:
The new item row option is available when a List View is displayed in edit mode. To set the row’s location, use the DefaultListViewOptions attribute in code. Alternatively, use the IModelListViewNewItemRow.NewItemRowPosition property of the appropriate Views | List View node. By default, the row is not displayed.
Supports the preview section. It is a non-editable region in data rows that displays a particular column’s content across all the List Editor’s columns:
The column whose content is displayed in the preview section is specified by the IModelListViewPreviewColumn.PreviewColumnName property of the Application Model’s Views | <ListView> node.
Supports Banded Grid Views.
For details, refer to the List View Bands Layout and How to: Configure Bands in a Grid List Editor (WinForms and ASP.NET) topics.
Supports the in-place editing feature. It allows the GridListEditor to represent its cells via various Property Editors:
Supports the filter panel. It allows you to quickly filter the grid:
The filter panel can be activated via the IModelListViewShowAutoFilterRow.ShowAutoFilterRow property of the Application Model’s Views | <ListView> node.
Supports filtering, sorting and grouping:
You can specify a group interval, so that groups are not created for each unique value, but for specific value ranges. To do this, use the IModelColumn.GroupInterval property of the Application Model’s Views | <ListView> | Columns | Column node.
- Supports all List View data access modes. These modes can be activated via the IModelListView.DataAccessMode property of the appropriate Views | List View node.
The GridListEditor is used by default in XAF Windows Forms applications. So generally, there is no need to instantiate it in your code. However, the GridListEditor exposes a range of useful public members that are not defined in the base ListEditor class. These members can be accessed, for example, from a custom Controller or Action. The following table lists them.
|Property Name||Member Type||Description|
|WinColumnsListEditor.ColumnCreated||Event||Occurs after a column has been created in the GridListEditor‘s GridView. Handle this event to be notified after a column has been created or recreated in the GridListEditor‘s GridView.|
|WinColumnsListEditor.Grid||Property||Provides access to the GridListEditor‘s GridControl control.|
|GridListEditor.GridView||Property||Provides access to the GridControl‘s View that is used to represent data in two-dimensional grid form.|
|GridListEditor.ProcessSelectedItemBySingleClick||Property||Specifies whether a List View’s record must be processed after a click or a double-click.|
|GridListEditor.TrackMousePosition||Property||When this property is set to true, moving the mouse within the GridListEditor‘s region changes the focus to the row that is under the mouse pointer.|
To see examples on how to access the GridListEditor from a View Controller, refer to the following topics:
- Access Grid Control Properties
- How to: Filter Large List Views using the Auto Filter Row
- How to: Filter List Views on the UI Specific Level
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GridListEditor class.
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.