In this post we will take a look on, how to find which button is selected in KendoUI Mobile ButtonGroup . Let us suppose we have a ButtonGroup like following,
ButtonGroup will look like following
In JavaScript we can find index of selected button as following.
buttonsearchgroupis the id of the ButtonGroup. We can check for the selected index in if condition to perform a task according to the selected button in ButtonGroup. This can be done as following,
if ( $("#buttonsearchgroup").data("kendoMobileButtonGroup").current().index() == 1) { console.log("session button selected"); } else { console.log("speaker button selected"); }
In this way you can find which button is selected in KendoUI Mobile ButtonGroup. I hope you find this post useful. Thanks for reading.