RadButton radio and Itemtemplate

5 posts, 0 answers
  1. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 05 Jun 2012 Link to this post

    Is there any way to make this work? I mean I want to use radbutton inside repeater and generate proper radio. But groupname is generated automatically and radio button is just not working. If I cannot use repeter is there any other way to use radbutton as bindable list simillar to radiobuttonlist?
  2. Abhishek
    Abhishek avatar
    45 posts
    Member since:
    Jul 2012

    Posted 07 Jun 2012 Link to this post

    Hi Marcin,

    I have worked around small example considering your issue. Please have one look in below code.
    <script type="text/javascript" charset="utf-8">
            $(document).ready(function () {
                $('input:radio').attr("name", "CommonGroup");
            });
        </script>
        <fieldset>
            <legend>Radio List Fuctionality Using Data List</legend>
            <asp:DataList ID="test" DataSourceID="SqlDsGetRetReservations" runat="server" RepeatDirection="Horizontal">
                <ItemTemplate>
                    <asp:RadioButton ID="DemoRadio" Text='<%#Eval("Name") %>' runat="server" />
                </ItemTemplate>
            </asp:DataList>
            <asp:XmlDataSource ID="SqlDsGetRetReservations" runat="server" DataFile="~/XMLFiles/RadioButton.xml">
            </asp:XmlDataSource>
        </fieldset>

    Let me know if any issue.

    Thanks & Regards,
    Abhishek K
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 22 Jun 2012 Link to this post

    thank you
  5. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 01 Apr 2013 Link to this post

    Hi

    How could you expand this to have multiple radio box list goupls on one page

    A
  6. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 02 Apr 2013 Link to this post

    Hello Andy,

    I have already replayed to your post in this forum thread, so you can find my answer there.

    Greetings,
    Danail Vasilev
    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
UI for ASP.NET Ajax is Ready for VS 2017