This is a migrated thread and some comments may be shown as answers.

Problem creating a radio button with RadButton

1 Answer 51 Views
This is a migrated thread and some comments may be shown as answers.
Donald Norris
Top achievements
Rank 1
Donald Norris asked on 13 Sep 2012, 09:00 PM
In the attached code I copied directly from your code in demos to create a radio button from a RadButton.  I cannot get it to work.  Please tell me what I did wrong. 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestBed2.aspx.vb" Inherits="TestBed2" %>
<!DOCTYPE html>
<head runat="server">
    <style type="text/css">
            float: left;
            width: 150px;
            width: 100%;
            clear: both;
            height: 110px;
    <form id="form1" runat="server">
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <div class="classDiv">
        <telerik:RadButton ID="RadButton16" runat="server" ToggleType="Radio" ButtonType="StandardButton"
            GroupName="StandardButton" AutoPostBack="false">
                <telerik:RadButtonToggleState Text="Checked" PrimaryIconCssClass="rbToggleRadioChecked" />
                <telerik:RadButtonToggleState Text="UnChecked" PrimaryIconCssClass="rbToggleRadio" />

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 18 Sep 2012, 09:44 AM
Hi Donald,

Please note that a radio RadButton as well as a standard radio button is designed to function in a group of buttons of that type in order to enable a selection of a single item from a list. If you add several RadButtons with ToggleType="Radio" and with property GroupName set to StandardButton (the same as that of the button control on your page) the radio buttons will work as expected.

This is shown in the online demo Radios and Checkboxes, from which you copied your code. As you can check the radio RadButtons are grouped by three and you can check only one at a time.

Feel free to contact us again if you encounter more difficulties.

the Telerik team
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 their blog feed now.
Asked by
Donald Norris
Top achievements
Rank 1
Answers by
Telerik team
Share this question