This is a migrated thread and some comments may be shown as answers.

Trouble Finding Selected Button

1 Answer 321 Views
ButtonGroup
This is a migrated thread and some comments may be shown as answers.
Shawn R.
Top achievements
Rank 1
Shawn R. asked on 21 Feb 2012, 05:58 PM
Could you please provide the code for finding the selected button in a button group. 

The documentation says there is a method called current() that will "Get the currently selected Button" and that it returns a jQueryObject of the selected button.

I use:
var buttongroup = $("#buttonGroup").data("kendoMobileButtonGroup")

and then I'm trying to use

buttongroup.current() 

which does indeed return a jQueryObject, but it looks like the buttongroup and not the selected button. I've used firebug and been all over the return object from buttongroup.current() and can't find a thing that helps me with what is selected.

I'm sure it's something stupid.

Thanks - Shawn

1 Answer, 1 is accepted

Sort by
0
Shawn R.
Top achievements
Rank 1
answered on 22 Feb 2012, 04:04 AM
This was related to my nested groupbutton HTML problem found here:
http://www.kendoui.com/forums/mobile/listview/format-issue-with-nested-button-groups.aspx 

Once that was corrected this:
$("#GroupButton").data("kendoMobileButtonGroup").current().index()

worked as expected.

Thanks - Shawn
Tags
ButtonGroup
Asked by
Shawn R.
Top achievements
Rank 1
Answers by
Shawn R.
Top achievements
Rank 1
Share this question
or