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

RadButton radio and Itemtemplate

4 Answers 141 Views
Button
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Veteran
Marcin asked on 05 Jun 2012, 03:31 PM
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?

4 Answers, 1 is accepted

Sort by
0
Abhishek
Top achievements
Rank 2
answered on 07 Jun 2012, 08:52 AM
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
0
Marcin
Top achievements
Rank 1
Veteran
answered on 22 Jun 2012, 09:56 AM
thank you
0
Andy Green
Top achievements
Rank 2
answered on 01 Apr 2013, 05:17 PM
Hi

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

A
0
Danail Vasilev
Telerik team
answered on 02 Apr 2013, 12:27 PM
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.
Tags
Button
Asked by
Marcin
Top achievements
Rank 1
Veteran
Answers by
Abhishek
Top achievements
Rank 2
Marcin
Top achievements
Rank 1
Veteran
Andy Green
Top achievements
Rank 2
Danail Vasilev
Telerik team
Share this question
or