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

Event on Radio button selection

Thread ID:





148317 Oct 15,2019 12:35 PM UTC Oct 16,2019 11:55 AM UTC JavaScript - EJ 2 1
Tags: ButtonGroup
Asked On October 15, 2019 12:35 PM UTC

Hi, Following link shows how to create button group for single selection.

However, there is no API or method for onclick event of radio button selection.
Can you pls share some sample for on click event for button group

Saranya Dhayalan [Syncfusion]
Replied On October 16, 2019 11:55 AM UTC

 Hi Saravanan, 

Thank you for contacting Syncfusion support. 

We have checked your query and it can be achieved by using JavaScript “onclick” event for an input element. We have created simple sample based on your scenario. Please refer the below code snippet and sample link. 

<p class="h5">Radio selection</p> 
<div id="text" class="e-btn-group"> 
    <input type="radio" id="left" name="align" value="left"> 
    <label class="e-btn" for="left">Left</label> 
    <input type="radio" id="center" name="align" value="center"> 
    <label class="e-btn" for="center">Center</label> 
    <input type="radio" id="right" name="align" value="right"> 
    <label class="e-btn" for="right">Right</label> 
document.getElementById('left').onclick = function () { 
  console.log('You clicked left radio button'); 
document.getElementById('center').onclick = function () { 
  console.log('You clicked center radio button'); 
document.getElementById('right').onclick = function () { 
  console.log('You clicked right radio button'); 
Sample link: 
Could you please check the above sample and get back to us If you need further assistance on this? 

Saranya D 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon