Edit this page

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");

    console.log(selected.attr("id"));
</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