Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Nodes
    [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 Representation
    [Expand]Sorting
    [Expand]Filtering
    [Expand]Summaries
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
    [Expand]Miscellaneous
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[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
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Assigning Editors to Individual Cells

Expanded Assigning Editors to Individual Cells

Sometimes not every cell in a column is the same type, and in these cases you may want to assign different editors to different cells in the same column. To assign editors to individual cells, handle the TreeList.CustomNodeCellEdit event. While handling this event, you need to provide specific repository items, representing in-place editors, for each individual cell. Note that repository items being used must be added to the TreeList's internal repository (the EditorContainer.RepositoryItems inherited property) or external repository (the EditorContainer.ExternalRepository inherited property).

The image below displays the Tree List control when editors are assigned to individual cells.

By default, the editor assigned to a cell via the TreeListColumn.ColumnEdit property or TreeList.CustomNodeCellEdit event will be also 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 sample code handles the TreeList.CustomNodeCellEdit event to assign different in-place editors (repository items) to cells. It's assumed that these editors have already been added to the Tree List's repository.

The image below shows the result.

Expanded See Also

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