enable
Enables or disables the DropDownButton and all the items in the Button list.
Parameters
state Boolean
Indicates whether the DropDownButton should be enabled or disabled. true
and false
arguments are accepted. If no argument is supplied, the DropDownButton will assume true
and will be enabled.
items String|jQuery
Collection of the items to disabled/enabled.
Example
<button id="dropdownbutton" type="button">Button</button>
<script>
$("#dropdownbutton").kendoDropDownButton({
items:[
{ text: "item 1" },
{ text: "item 2" }
]
});
var button = $("#dropdownbutton").data("kendoDropDownButton");
// disable button
button.enable(false);
</script>
Example - disable a specific item
<button id="dropdownbutton" type="button">Button</button>
<script>
$("#dropdownbutton").kendoDropDownButton({
items:[
{ id: "item1", text: "Item 1" },
{ id: "item2", text: "Item 2" }
]
});
var button = $("#dropdownbutton").data("kendoDropDownButton");
button.enable(false, "#item1");
</script>
Example - disable a collection of items
<button id="dropdownbutton" type="button">Button</button>
<script>
$("#dropdownbutton").kendoDropDownButton({
items:[
{ id: "item1", text: "Item 1" },
{ id: "item2", text: "Item 2" }
]
});
var button = $("#dropdownbutton").data("kendoDropDownButton");
button.enable(false, $("#item1, #item2"));
</script>