[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)

Showing and Hiding Editors

Expanded Showing and Hiding Editors

The focused cell's editor can be invoked by calling the TreeList.ShowEditor method. So, if you want to edit a specific cell, you must first focus it. If you want to close the editor programmatically, there are two methods available:

You can also use the Tree List's TreeList.PostEditor method to save changes without closing the editor.

The Tree List control also enables you to perform actions each time an editor is activated or closed, either by end-users or programmatically. This can be done by handling the TreeList.ShownEditor and TreeList.HiddenEditor events, respectively. The first one can be used to facilitate working with the editor itself (for example, you can open the MemoExEdit editor's popup window when it's activated). As for the TreeList.HiddenEditor event, you can handle it to perform any cleanup necessary after the TreeList.ShowEditor event handler has been executed, or to perform other actions when an editor is closed.

Note that the editors cannot be invoked in the following cases:

Expanded Example

The following example shows how to change the focused node's state image when an in-place editor is activated and closed. To respond to activating and closing in-place editors, the TreeList.ShownEditor and TreeList.HiddenEditor events are handled. The TreeList.CellValueChanged event is handled to change the node's select image, in order to indicate that the value of the node's cell has been modified by an end-user.

The image below shows the result.

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