How do I allow users to rename nodes in a hierarchical tree?

Problem Statement

Users need the ability to edit the labels next to nodes in a tree-like interface.  For example, they may be browsing a document repository and the act of renaming a node in the tree-like interface would be equivalent to renaming a document stored within the repository.

Your application has already chosen to use a tree-like interface to permit end users to navigate through hierarchically-arranged business entities which can be renamed.

Infragistics Solutions

ASP.NET     Windows Forms    
 

When turning on the Editable property of a WebTree control, your users can click on a selected tree node to edit it's text label.  A text box for editing the label appears in place, and any changes made by the user will be reflected in the Node's Text property.  The appearance of the text box is governed by the NodeEditStyle property you have set on the server-side WebTree control.

You can programmatically cause any tree node to enter into edit mode (as a result of another user action on the Web page) by calling the Javascript edit() function on a specific WebTree Node CSOM object, which you can retrieve using the Javascript igtree_getNodeById() function.

WebTree exposes its Node objects through the Client-Side Object Model, or CSOM, so that you can handle events through Javascript event handlers. You can add an event handler to the BeforeBeginNodeEdit event which gives you an opportunity to dynamically determine whether to allow editing on this individual node.  You can also add an event handler to the AfterEndNodeEdit event which gives you an opportunity to reverse the change in the node's text if the newly entered value doesn’t meet any criteria you define.

Other Solutions in the Data Entry Category

More Scenario Solutions...