Command Columns

  • 2 min to read

Command columns are designed to allow end-users manipulate the ASPxTreeList's data. Command columns are stored together with data columns within the ASPxTreeList.Columns collection.

Commands

A command column is represented by the TreeListCommandColumn class. It provides a set of commands that allow end-users to switch the ASPxTreeList to edit mode, update data, delete and add nodes, etc.

A command column allows multiple command buttons to be displayed within a cell. A command button represents a single command. There are five commands:

Class Name Description Property
New Switches the ASPxTreeList to edit mode, and allows you to initialize and create a new node. TreeListCommandColumn.NewButton
Edit Switches the ASPxTreeList to edit mode. TreeListCommandColumn.EditButton
Delete Deletes a node. TreeListCommandColumn.DeleteButton
Update Saves all the changes made to the current node and switches the ASPxTreeList to browse mode. TreeListCommandColumn.UpdateButton
Cancel Discards any changes made to the current node and switches the ASPxTreeList to browse mode. TreeListCommandColumn.CancelButton

Behavior

End-users can move command columns among visible columns or to the Customization Window, by dragging their headers. This is controlled by the TreeListSettingsBehavior.AllowDragDrop option.

Custom Buttons

Command columns can also display custom buttons within cells. You can create your own buttons, and define custom actions for them. For an example, see How to: Create Custom Command Buttons.