AddCommandDirective
Represents the command for adding a new item to the TreeList. You can apply this directive to any
button
element inside a ToolbarTemplate
or
inside a CommandColumnComponent
.
When an associated button with the directive is clicked, the
add
event is triggered
(see example).
When the row is in the edit mode
, the button with kendoTreeListAddCommand
is automatically hidden.
When added to the command column, the directive takes as input the cellContext
from the cell template.
<kendo-treelist ...>
<kendo-treelist-command-column title="command">
<ng-template kendoTreeListCellTemplate let-cellContext="cellContext">
<button [kendoTreeListAddCommand]="cellContext" class="k-primary">Edit</button>
</ng-template>
</kendo-treelist-command-column>
</kendo-treelist>
Selector
[kendoTreeListAddCommand]
Inputs
Name | Type | Default | Description |
---|---|---|---|
kendoTreeListAddCommand |
|
The | |
disabled |
|
|
If set to |
fillMode |
|
|
The fillMode property specifies the background and border styles of the Button (see example). |
icon |
|
Defines the name for an existing font icon in the Kendo UI theme. | |
iconClass |
|
Defines a CSS class—or multiple classes separated by spaces—
which are applied to a | |
imageUrl |
|
Defines a URL which is used for an | |
rounded |
|
|
The rounded property specifies the border radius of the Button (see example). |
selected |
|
|
Sets the selected state of the Button. |
size |
|
|
The size property specifies the padding of the Button (see example). |
svgIcon |
|
Defines an SVGIcon to be rendered within the button. | |
themeColor |
|
|
The Button allows you to specify predefined theme colors. The theme color will be applied as a background and border color while also amending the text color accordingly (see example). |
toggleable |
|
|
Provides visual styling that indicates if the Button is active. |
Events
Name | Type | Description |
---|---|---|
click |
|
Fires each time the user clicks the button. |
selectedChange |
|
Fires each time the selected state of a toggleable button is changed. The event argument is the new selected state (boolean). |
Methods
blur |
---|
Blurs the Button component. |
focus |
---|
Focuses the Button component. |