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.
Unfortunately, activation email could not send to your email. Please try again.

Ribbon ToggleButton

Thread ID:

Created:

Updated:

Platform:

Replies:

128444 Jan 23,2017 02:14 AM Jan 25,2017 12:24 AM ASP.NET Core 3
loading
Tags: Ribbon
George Rossopoulos
Asked On January 23, 2017 02:14 AM

Hi

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
George


function onBing(e)
{
$('#btosm').attr('toggleState;,false);
}

Buvana Sathasivam [Syncfusion]
Replied On January 24, 2017 02:37 AM

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>   
  <e-content>    
      <e-contents>   
          <e-content-groups>   
   
              // 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"/>   
                </e-content-group>   
                 
              // second toggle button   
                <e-content-group id=”btosm">   
                  <e-toggle-button-settings default-text="Btosm" active-text="Btosm" click="onBing"/>   
                </e-content-group>   
   
          </e-content-groups>   
         <e-defaults type="ToggleButton" height="70px" is-big="false"></e-defaults>   
      </e-contents>   
  </e-content>   
</e-group>   
  
   
<script>   
      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 });   
            }   
        else    
           $("#defaultRibbon_home_Font_btosm").find("input.e-togglebutton").ejToggleButton({ "toggleState": false });   
        }   
</script>   
  
   
Please refer to the below UG documentation link for Toggle Buttons:   
   
Please let us know if you need further clarification.   
   
Regards,   
Buvana S.   


George Rossopoulos
Replied On January 24, 2017 03:49 AM

Hi Buvana

thank you for the prompt reply.
Solved.

George

Buvana Sathasivam [Syncfusion]
Replied On January 25, 2017 12:24 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;