click

Fires when the user clicks a command button.

The event does not fire for togglable buttons. If the button has togglable: true use the toggle event.

Event Data

e.target jQuery

The jQuery object that represents the command element.

e.id String

The id of the command element.

e.item Object

The item instance of the clicked item.

e.sender kendo.ui.ToolBar

The widget instance which fired the event.

Example - subscribe to the "click" event during initialization

<div id="toolbar"></div>
<script>
    $("#toolbar").kendoToolBar({
        items: [
            { type: "button", id: "btn1", text: "Button 1" },
            { type: "button", id: "btn2", text: "Button 2" }
        ],
        click: function(e) {
            console.log("click", e.target.text());
        }
    });
</script>

Example - subscribe to the "click" event after initialization

<div id="toolbar"></div>
<script>
    $("#toolbar").kendoToolBar({
        items: [
            { type: "button", id: "btn1", text: "Button 1" },
            { type: "button", id: "btn2", text: "Button 2" }
        ]
    });

    var toolbar = $("#toolbar").data("kendoToolBar");
    toolbar.bind("click", function(e){
        console.log("click", e.target.text());
    });
</script>
In this article
Not finding the help you need?