Edit this page

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.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>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy