<kendo:treeList-toolbarItem>

If a String value is assigned to the toolbar configuration option, it will be treated as a single string template for the whole TreeList toolbar and the string value will be passed as an argument to a kendo.template() function.; If a Function value is assigned (it may be a kendo.template() function call or a generic function reference), then the return value of the function will be used to render the contents of the TreeList toolbar. or If an Array value is assigned, it will be treated as the list of commands which are displayed in the TreeList toolbar. Commands can be custom or built-in. The supported built-in commands are:create - Adds an empty data item to the treelist.excel - Exports the TreeList data in MS Excel format.pdf - Exports the TreeList data in PDF format.search - built-in search panel for the TreeList..

Example

<kendo:treeList-toolbar>
    <kendo:treeList-toolbarItem></kendo:treeList-toolbarItem>
</kendo:treeList-toolbar>

Configuration Attributes

click java.lang.String

The click handler of the toolbar command. Used for custom toolbar commands.

Example

<kendo:treeList-toolbarItem click="click">
</kendo:treeList-toolbarItem>

icon java.lang.String

Specifies the icon's name that will be rendered inside the toolbar button. When you set this option, the TreeList renders an additional span element inside the toolbar button which has a name set to the option value. This approach allows you to display an icon inside your custom toolbar commands.

Example

<kendo:treeList-toolbarItem icon="icon">
</kendo:treeList-toolbarItem>

imageClass java.lang.String

A class name that will be rendered inside the toolbar button. When you set this option, the TreeList renders an additional span element inside the toolbar button which has a class name set to the option value. This approach allows you to display an icon inside your custom toolbar commands.

Example

<kendo:treeList-toolbarItem imageClass="imageClass">
</kendo:treeList-toolbarItem>

name java.lang.String

The name of the toolbar command. Can be either a built-in ("create", "excel", or "pdf") or a custom string. The name is output in the HTML as a value of the data-command attribute of the button.

Example

<kendo:treeList-toolbarItem name="name">
</kendo:treeList-toolbarItem>

template java.lang.String

The template which renders the command. By default renders a button. Uses the template for a ToolBar item toolbar.items.template

Example

<kendo:treeList-toolbarItem template="template">
</kendo:treeList-toolbarItem>

text java.lang.String

The text that is displayed by the command button. If not set, the TreeList will use the name` option as the button text instead.

Example

<kendo:treeList-toolbarItem text="text">
</kendo:treeList-toolbarItem>

Event Attributes

click String

The click handler of the toolbar command. Used for custom toolbar commands.

Example

<kendo:treeList-toolbarItem click="handle_click">
</kendo:treeList-toolbarItem>
<script>
    function handle_click(e) {
        // Code to handle the click event.
    }
</script>

template String

The template which renders the command. By default renders a button. Uses the template for a ToolBar item toolbar.items.template

Example

<kendo:treeList-toolbarItem template="handle_template">
</kendo:treeList-toolbarItem>
<script>
    function handle_template(e) {
        // Code to handle the template event.
    }
</script>

Event Tags

kendo:treeList-toolbarItem-click

The click handler of the toolbar command. Used for custom toolbar commands.

Example

<kendo:treeList-toolbarItem>
    <kendo:treeList-toolbarItem-click>
        <script>
            function(e) {
                // Code to handle the click event.
            }
        </script>
    </kendo:treeList-toolbarItem-click>
</kendo:treeList-toolbarItem>

kendo:treeList-toolbarItem-template

The template which renders the command. By default renders a button. Uses the template for a ToolBar item toolbar.items.template

Example

<kendo:treeList-toolbarItem>
    <kendo:treeList-toolbarItem-template>
        <script>
            function(e) {
                // Code to handle the template event.
            }
        </script>
    </kendo:treeList-toolbarItem-template>
</kendo:treeList-toolbarItem>
In this article
Not finding the help you need?