getSelectedFromGroup
Returns the selected toggle button from the specified group.
Parameters
groupName String
The name of the group.
Example - get selected button from group with name "radio"
<div id="toolbar"></div>
<script>
$("#toolbar").kendoToolBar({
items: [
{
type: "buttonGroup",
buttons: [
{ type: "button", id: "btn1", text: "Button 1", togglable: true, group: "radio" },
{ type: "button", id: "btn2", text: "Button 2", togglable: true, group: "radio", selected: true },
{ type: "button", id: "btn3", text: "Button 3", togglable: true, group: "radio" }
]
}
]
});
var toolbar = $("#toolbar").data("kendoToolBar");
var selected = toolbar.getSelectedFromGroup("radio");
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(selected.attr("id"));
</script>