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

Javascript equivelant of GetCheckedGroupButton

2 Answers 38 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 12 Jun 2015, 06:12 PM

I have been trawling for an answer to this question but nothing is coming up.

In code behind with a RadToolBar I can use

 

GetCheckedGroupButton()

 

to identify which item is "clicked"

 

I cannot find any reference to a javascript version of this?

 is there one?

thanks

jON

 

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 17 Jun 2015, 02:45 PM
Hello Jon,

Unfortunately there is no such client method and the control.

In such case I would recommend you to go through all the items and return the one that is checked. Here is a sample code that worked at my side:
var items = toolBar.get_items();
 
       for (var i = 0; i < items.get_count(); i++) {
           if (items.getItem(i).get_checked()) {
               alert(items.getItem(i).get_text());
           }
       }


Regards,
Plamen
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jon
Top achievements
Rank 1
answered on 28 Jun 2015, 09:43 AM

Thanks, that worked for me.

 jON

Tags
ToolBar
Asked by
Jon
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Jon
Top achievements
Rank 1
Share this question
or