The command column of a Gantt Tree allows you to initiate editing, or to execute your own commands.
To define it, add a
GanttCommandColumn in the
GanttColumns collection of a Gantt Chart. The command column takes a collection of
GanttCommandButton instances that invoke the commands.
The lists below showcase the available features and their use. After them you can find a code example that shows declarations and handling.
In this article:
- Gantt Tree Command Column Features
- Code Example
This section describes the available features and their use.
GanttCommandButton tag offers the following features:
Command- the command that will be invoked. Can be one of the built-in commands (see below), or a custom command name.
booleanproperty indicating whether the button is only visible while the user is editing/inserting data.
ChildContent- the text the button will render. You can also place it between the command button's opening and closing tags.
- Appearance properties like
Enabledthat are come from the underlying Button Component features.
There are four built-in commands:
Add- initiates the creation of a new item. Can apply to rows as well, to create a child element for the current row.
Edit- initiates the editing in the Gantt Tree.
Save- performs the actual update operation after the data has been changed. Triggers the
OnCreateevent so you can perform the data source operation. Which event is triggered depends on whether the item was created or edited.
Cancel- aborts the current operation (edit or insert).