We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Ribbon ToggleButton


i have the follow problem.
I have 2 togglebuttons and I want each time I press a button the previous selected to cleared.
The html for the two togglebuttons is bellow simplified JavaScript. By default the 'btbing' button is ON.
Now if the user clicks the 'btosm' button i want the 'btbing' to turned off.
I am using Javasript and jquery.
the JavaScript is as follow but does not work

Thank you in advance for the Help

function onBing(e)

3 Replies

BS Buvana Sathasivam Syncfusion Team January 24, 2017 07:37 AM UTC

Hi George,   
Thank you for using Syncfusion products.   
We suspect that the cause of the issue is because you are using attr('toggleState:false’); . You need to use  ej control properties like, ejToggleButton({ "toggleState": false }).  Please check the following code to resolve the issue.   
<e-group text="Save" align-type=Rows>   
              // By default btbing first toggle button is ON   
               <e-content-group id=”btbing">   
                  <e-toggle-button-settings default-text="Btbing" active-text="Btbing" toggle-state="ture" click="onBing"/>   
              // second toggle button   
                <e-content-group id=”btosm">   
                  <e-toggle-button-settings default-text="Btosm" active-text="Btosm" click="onBing"/>   
         <e-defaults type="ToggleButton" height="70px" is-big="false"></e-defaults>   
      function onBing(e) {   
         // check btosm toggle button   
          if (args.model.activeText == "Btosm") {   
           // Call ribbon toggle button Id and find toggle button and set toggle state   
           $("#defaultRibbon_home_Font_btbing").find("input.e-togglebutton").ejToggleButton({ "toggleState": false });   
           $("#defaultRibbon_home_Font_btosm").find("input.e-togglebutton").ejToggleButton({ "toggleState": false });   
Please refer to the below UG documentation link for Toggle Buttons:   
Please let us know if you need further clarification.   
Buvana S.   

GR George Rossopoulos January 24, 2017 08:49 AM UTC

Hi Buvana

thank you for the prompt reply.


BS Buvana Sathasivam Syncfusion Team January 25, 2017 05:24 AM UTC

Hi George, 
Thanks for your update. Let us know if you have any queries, we are happy to assist you. 
Buvana S. 

Live Chat Icon For mobile
Up arrow icon