Tool bar items in JavaScript Treegrid control
18 Nov 20182 minutes to read
Built-in toolbar items
Built-in toolbar items execute standard actions of the treegrid, and it can be added by defining the toolbar as a collection of built-in items. It renders the button with icon and text.
The following table shows built-in toolbar items and its actions.
| Built-in Toolbar Items | Actions |
|---|---|
| ExpandAll | Expands all the rows. |
| CollapseAll | Collapses all the rows. |
| Add | Adds a new record. |
| Edit | Edits the selected record. |
| Update | Updates the edited record. |
| Delete | Deletes the selected record. |
| Cancel | Cancels the edit state. |
| Search | Searches the records by the given key. |
| Prints the treegrid. | |
| ExcelExport | Exports the treegrid to Excel. |
| PdfExport | Exports the treegrid to PDF. |
| WordExport | Exports the treegrid to Word. |
| Indent | Indents the record to one level of hierarchy. |
| Outdent | Outdents the record to one level of hierarchy. |
- The
toolbarhas options to define both built-in and custom toolbar items.
Enable or disable toolbar items
You can enable/disable toolbar items by using the enableItems method.