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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get radio button value

Thread ID:





130269 May 3,2017 01:28 PM UTC May 4,2017 01:21 PM UTC ASP.NET Web Forms 1
Tags: RadioButton
Asked On May 3, 2017 01:28 PM UTC


  I need  page load rbyes radio button default checked true and Jquery button click event get radio button status (true/false)




<input type="radio" name="radiobutn" id="rbyes" />

<label for="radiobtn">yes</label>



<input type="radio" name="radiobutn" id="rbno" />

<label for="radiobtn">no</label>





sureshkumar.P [Syncfusion]
Replied On May 4, 2017 01:21 PM UTC

Hi Pratheep, 
Thanks for contacting Syncfusion support, 
Query 1: when page load the radio button default state is checked. 
We have checked with your query and you can achieve your requirement by using our existing “checked” property. please refer the below code example 
<ej:RadioButton Name="category" ID="Radio1" runat="server"  
                Checked="true" Text="1+ years" ></ej:RadioButton>        
Query 2: in button click, need to get radio button status (true/false): 
               This can be achieved with help of our existing “checked” property which will return the checked state of the radio button. 
Here we have used our EJ button and its click event. In this event, we get the checked state of required radio button by using instance of that required button. 
Please refer the below code sample 
<ej:RadioButton Name="category" ID="Radio1" runat="server" CssClass="RadioNode" Checked="true" Text="1+ years" ></ej:RadioButton>  
<ej:Button ID="btn" runat="server" Type="Button" Text="Status" ClientSideOnClick="onBtnClick"></ej:Button>  
function onBtnClick() { // triggers while click the ejbutton 
            obj = $("#<%=Radio1.ClientID%>").ejRadioButton("instance"); 
               // instance creation for radiobutton 
            console.log("the radioButton checked state is : " + obj.model.checked); 
            // obj.model.checked – prints the checked status of the radiobutton             
In the above code example, we have render the first radiobutton as checked state in initial loading by setting our “checked” property as “true” and while click the ejbutton we have get the radiobutton status by using “checked” property with created instance to the radiobutton.  
for your convenience, we have attached the sample in the bellow link http://www.syncfusion.com/downloads/support/forum/130269/ze/RadioButton_forum130269232294174   
Please find the documentation link to know more about the “checked” property. Refer to the following link https://help.syncfusion.com/api/js/ejradiobutton#members:checked  
Please let us know if you need any further assistance.  
Sureshkumar P 


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