I want to toggle RibbonBarToggleButton in client side. I tried togglebutton.Toggled = true; But there is no effect. I tried server side code, its working fine. How can I solve this. NB: I am using Telerik 2013.1.220.40
Thank you
abhi
3 Answers, 1 is accepted
0
Accepted
Kate
Telerik team
answered on 11 Oct 2013, 09:18 AM
Hello Abhilash,
You can use the client-side get_toggled() and set_toggled() properties of the toggled button. For example you can use the following code to get the toggle state of a particular toggle button:
function OnClientApplicationMenuItemClicking(sender, args) {
sender.findToggleButtonByValue("toggle1").get_toggled(); }
Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Can you help me to find ddlText and set an item selectable on a button click (client side)
<telerik:RibbonBarDropDown ID="ddlText" Width="97" >
<Items>
<telerik:RibbonBarListItem Text="Arial" />
<telerik:RibbonBarListItem Text="Calibri (body)" Selected="true" />
<telerik:RibbonBarListItem Text="Comic Sans" />
<telerik:RibbonBarListItem Text="Tahoma" />
<telerik:RibbonBarListItem Text="Verdana" />
</Items>
</telerik:RibbonBarDropDown>
0
Kate
Telerik team
answered on 21 Oct 2013, 12:46 PM
Hello Abhilash,
To access the needed item from the RibbonBarDropDown you can find it by its index. For example the following code returns the text of the first RibbonBarListItem:
//here I find the ribbonbar first
var ribbon = $find("ribbonbar1");
//here I get the first tab, the first group and then the third element in the group which is the RibbonBarDropDown
To adjust it to your particular scenario you might need to change the indexes of the tabs, the groups and the items.
Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.