ASP.NET GridView RadioButton

I want to add a RadioButton in my Gridview.   The functionality should work that when I click on the RadioButton only one button is selected (not like a checkbox where you can have multiple selects).  Here is what I have but I am able to select more than one.  Any ideas how to fix?

<asp:GridView ID="grdCoList" AllowSorting="True" 
  OnSorting ="grdCoList_Sorting" width="100%"
  runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"   
  AutoGenerateColumns="False" HeaderStyle-VerticalAlign="Bottom" >
                       
  <PagerStyle BackColor="#919191" Font-Bold="True" ForeColor="White" 
     HorizontalAlign="Center" />
  <HeaderStyle BackColor="#919191" Font-Bold="True" ForeColor="White" />  
  <RowStyle BackColor="#EAEAEA" />
  <AlternatingRowStyle BackColor="White" />
                          
   <Columns>
       <asp:TemplateField>
           <ItemTemplate>
               <asp:RadioButton ID="rbSelected" runat="server" GroupName="CoGroup" />
           </ItemTemplate>
       </asp:TemplateField>
                        
       <asp:BoundField DataField="CoID" HeaderText="Co ID" SortExpression="CoID" 
            HeaderStyle-VerticalAlign="Bottom" ItemStyle-Wrap="false" 
            HeaderStyle-Wrap="false" />
       <asp:BoundField DataField="CoName" HeaderText="Co Name" 
            SortExpression="CoName" HeaderStyle-VerticalAlign="Bottom" 
            ItemStyle-Wrap="false" HeaderStyle-Wrap="false" />
   </Columns>
</asp:GridView>

Open in new window

LVL 2
CipherISAsked:
Who is Participating?
 
Roopesh ReddyIT AnalystCommented:
Hi,

Check the CodeProject article - http://www.codeproject.com/Articles/7960/How-to-group-RadioButtons

Hope it helps u...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.