enable

Enables or disables the specified command. If the second parameter is omitted it will be treated as true and the command will be enabled.

Parameters

command String|Element|jQuery

A string, DOM element or jQuery object which represents the command to be enabled or disabled. A string is treated as jQuery selector.

enable Boolean

A boolean flag that determines whether the command should be enabled (true) or disabled (false). If omitted the command will be enabled.

Example - enable command

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

    var toolbar = $("#toolbar").data("kendoToolBar");
    toolbar.enable("#btn1"); //enables the initially disabled command
</script>

Example - disable command

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

    var toolbar = $("#toolbar").data("kendoToolBar");
    toolbar.enable("#btn1", false); //disables the initially disabled command
</script>
In this article