views:

386

answers:

1

I am trying to bind a radiobutton list inside a repeater.

So for example my output will be :

Group1
Group1
Group1

Group2
Group2
Group2

Group3
Group3
Group3

I need the user to be able to select only 1 item from Each group, so in total 3 items should be selected.

<asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>                    
                <asp:RadioButtonList runat="server"  DataSource="<%# ((Outlet)Container.DataItem).OutletInformations %>" DataValueField="DateOfDelivery" DataTextField="DateOfDelivery" />
            </ItemTemplate>
        </asp:Repeater>

When the HTML renders out the page I have 3 groups as mentioned which is perfect but my selection is not working at all, as soon as I select 1 item from each group I cannot change my selection anymore, any help would be appreciated ! Thanks

A: 

As i know you can not do that simply as this because Group attribute will be generate like clientID.

But hear you can find a solution http://www.codeproject.com/KB/webforms/How%5Fgroup%5FRButtons.aspx

Florim Maxhuni