New to Kendo UI for AngularStart a free 30-day trial

AddCommandDirective

Updated on Feb 6, 2026

Represents the command for adding a new item to the TreeList. Apply this directive to any button element inside a ToolbarTemplate or inside a CommandColumnComponent.

When the user clicks a button with this directive, the add event is triggered (see example).

The button with kendoTreeListAddCommand is automatically hidden when the row is in edit mode.

When used in the command column, the directive takes the cellContext from the cell template as input.

html
<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

NameTypeDefaultDescription

kendoTreeListAddCommand

any

Provides the cellContext to the template.

disabled

boolean

false

When true, disables the Button and prevents user interaction.

fillMode

ButtonFillMode

Sets the background and border styles of the Button. See Button Appearance. The default value is set by the Kendo theme.

icon

string

Sets the name of an existing font icon in the Kendo UI theme.

iconClass

string

Defines a CSS class, or multiple classes separated by spaces applied to a span element inside the Button. Use the iconClass to add custom icons.

imageUrl

string

Specifies a URL for an img element inside the Button. The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.

rounded

ButtonRounded

Sets the border radius of the Button. See Button Appearance. The default value is set by the Kendo theme.

selected

boolean

false

Sets the selected state of the Button. Use with the toggleable property.

size

ButtonSize

Sets the padding of the Button. See Button Appearance. The default value is set by the Kendo theme.

svgIcon

SVGIcon

Sets an SVG icon to display inside the Button.

themeColor

ButtonThemeColor

Sets a predefined theme color for the Button. The theme color applies as a background and border color and adjusts the text color. See Button Appearance. The default value is set by the Kendo theme.

toggleable

boolean

false

Adds visual styling to indicate when the Button is active.

Events

NameTypeDescription

click

EventEmitter<any>

Fires when the user clicks the Button.

selectedChange

EventEmitter<any>

Fires when the selected state of a toggleable button changes. The event argument is the new selected state (boolean).

Methods

blur

Removes focus from the Button component.

focus

Focuses the Button component.

In this article
SelectorInputsEventsMethods
Not finding the help you need?
Contact Support