[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Collapse]Data Editing
      Inplace Editors
      Obtaining and Setting Cell Values
      Assigning Editors to Columns
      Assigning Editors to Individual Cells
      Showing and Hiding Editors
    [Expand]Data Presentation
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Assigning Editors to Columns

Expanded Online Video

Expanded Assigning Editors to Columns

The most common way of using in-place editors is by assigning them to columns. This is a typical scenario, since columns are usually presented as a number of fields that contain values of the same type. You can assign different editors to columns with respect to their type. An in-place editor can be assigned to a column as follows:

  • Create a corresponding repository item object, representing the required in-place editor.
  • Add the repository item to the internal or external repository.
  • Assign it to the TreeListColumn.ColumnEdit property.

The image below shows an example of assigning various editors to Tree List columns.

At design time, the TreeListColumn.ColumnEdit property provides a dropdown window that enables quick in-place editor assignment. The dropdown allows you to create a new in-place editor (repository item), or choose from among existing in-place editors. If you create a new in-place editor at design time, it's automatically added to the Tree List's internal repository.

For more information about repositories, see the Inplace Editors document.

By default, the editor assigned to a cell via the TreeListColumn.ColumnEdit property or TreeList.CustomNodeCellEdit event will also be used for editing the cell's contents. If you want to use a different editor for in-place editing, handle the TreeList.CustomNodeCellEditForEditing event.

Expanded Example

The following example demonstrates how to create and adjust a new in-place editor (ComboBoxEdit). The editor is bound to the "Location" column using the TreeListColumn.ColumnEdit property.

The screenshot below demonstrates the result of the code's execution

Expanded See Also

Is this topic helpful?​​​​​​​