Columns.command
configurationThe configuration of the column commands. If set, the column will display a button for every command. Commands can be custom or built-in
The built-in commands are:
edit- Switches the current table row to edit mode. Supports theinlineandpopupedit modes.createChild- Adds a new child item to the current table row and switches to edit mode.destroy- Removes the data item to which the current table row is bound.
Custom commands are supported by specifying the click option.
- Each custom command requires you to explicitly specify its
name.- A command column cannot be
expandable.- The built-in commands work only if editing is enabled through the
editableoption and the DataSource of the TreeList is configured for CRUD operations.
columns.command
ArrayThe CSS class that is applied to the command button.
columns.command.click
FunctionThe JavaScript function that is executed when the user clicks the command button. The function receives a jQuery event as an argument. The function context that is available through the this keyword will be set to the TreeList instance.
columns.command.icon
StringSpecifies the icon's name of the command button.
The CSS class that is applied to the icon span of the command button.
columns.command.name
StringThe name of the command. Commands can be built-in ("edit", "createChild" and "destroy") or custom. When set to a custom value, the name is rendered as a data-command attribute. For more information, refer to the columns.command section.
columns.command.text
StringThe text that is displayed by the command button. If not set, the name option is used as the button text. To have an icon button with no text, you can set the text property to an empty string.