RadTreeView provides API
for handling server-side (postback) events:
- NodeClick
- NodeDrop
- NodeCheck
- NodeBound
- NodeEdit
- NodeExpand
- NodeContextClick
This
example shows a sample approach using the NodeClick,
NodeDrop, NodeEdit, NodeExpand and NodeContextClick
events. Information about the rest of the server-side events supported by
RadTreeView can be found in the help docs � �RadTreeView
Server-side section�.
The events
shown in this example are fired as follows:
- NodeClick
� the AutoPostBack property of the RadTreeView class should be enabled.
When you click a node, its child-nodes structure is shown in the grid next to
the treeview.
- NodeDrop
� fired upon dropping a node onto another node. To enable
drag-and-drop
mode you
need to mark the instance of RadTreeView with the DragAndDrop="True"
attribute and you will be able to
drag and drop tree-nodes.
- NodeEdit
� you can simply select a node and press F2 (or click an already selected
node) and you'll be able to edit the node text client-side. In order to do
that, you need to set the AllowNodeEditing property of
RadTreeView to true.
- NodeExpand
- fired when users click on the "+" icon. To fire the event you should set the
ExpandMode of each tree-node
- NodeContextClick
�fired when
the end-users click on a ContextMenuItem of a tree-node. Thee ContextMenuItem
has to be marked with the PostBack ="True".