Problem creating a radio button with RadButton

2 posts, 0 answers
  1. Donald Norris
    Donald Norris avatar
    66 posts
    Member since:
    Mar 2006

    Posted 13 Sep 2012 Link to this post

    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" />
  2. Slav
    Slav avatar
    1359 posts

    Posted 18 Sep 2012 Link to this post

    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.
Back to Top