Solved

give groupname of radio button inside repeter

Posted on 2012-03-13
1
332 Views
Last Modified: 2012-03-19
Hello Experts,
   i am facing some problem in giving group name of radio button that is inside repeter please provide me the solutions that how can i do that


Below is the sample code
 <asp:Repeater ID="Repeater1" runat="server">
                                                  <HeaderTemplate>
                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                  <tr>
                                                    <td width="4%">&nbsp;</td>
                                                    <td width="13%" class="workshop-text"><span class="bold">DATES</span></td>
                                                    <td width="11%" class="workshop-text"><span class="bold">CITY</span></td>
                                                    <td width="15%" class="workshop-text"><span class="bold">LANGUAGE</span></td>
                                                    <td width="30%" class="workshop-text"><span class="bold">VENUE (Click for details)</span></td>
                                                    <td width="27%" class="workshop-text"><span class="bold">FEES</span></td>
                                                  </tr>
                                                  </HeaderTemplate>
                                                    <ItemTemplate>
                                                  <tr>
                                                    <td colspan="6" height="7"></td>
                                                  </tr>
                                                  <tr>
                                                    <td>
                                                       <asp:RadioButton ID="rbworkshop" runat="server" GroupName="rbworkshop1" />
                                                    </td>
                                                    <td class="workshop-detail">
                                                        <asp:Label ID="lbldate1" runat="server" Text='<%#Eval("FromDate","{0:MMM-dd}")+" "+Eval("ToDate","{0:MMM-dd}") %>'></asp:Label>
                                                    </td>
                                                    <td class="workshop-detail">
                                                        <asp:Label ID="lblcity" runat="server" Text='<%#Eval("city") %>'></asp:Label>
                                                    </td>
                                                    <td class="workshop-detail">
                                                        <asp:Label ID="lbllanguage" runat="server" Text='<%#Eval("Language") %>'></asp:Label>
                                                    </td>
                                                    <td class="workshop-detail">
                                                        <asp:Label ID="lblvenue" runat="server" Text='<%#Eval("Venue") %>'></asp:Label>
                                                    </td>
                                                    <td class="workshop-detail">Rs.
                                                    <asp:Label ID="lblfee" runat="server" Text='<%#Eval("Fees","{0:0.00}") %>'></asp:Label>
                                                    </td>
                                                  </tr>
                                                  </ItemTemplate>
                                                  <FooterTemplate>
                                                       <tr>
                                                            <td colspan="6" height="7"></td>
                                                       </tr>
                                                  </table>
                                                  </FooterTemplate>
                                                  </asp:Repeater>
0
Comment
Question by:dotsandcoms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
Mrunal earned 375 total points
ID: 37714740
GroupName property doesn't work as expected when used in a Repeater for radio buttons.

For server side controls (asp radio button) you have to do manually grouping.
I will suggest that instead of server side code, use simple html control. like this:

<input type="radio" name="rbworkshop" value='<%#Eval("CustomerNumber") %>' />

For postback, you can get the value from Request.Form("rbworkshop").

OR

for server side radio buttons, you have to manually set single radio button as selected by JavaScript function.

check this for more:

http://stackoverflow.com/questions/4030155/radio-button-list-in-repeater-control
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question