4
Reply

radiobutton to datagrid

sandeep kodepaka

sandeep kodepaka

Dec 22 2010 12:29 PM
1.8k

Hi frnz         
           i have group of  3 radio buttons, if i select one of those , that particular data should be displayed on datagrid, can anyone please help me out
below is the code
<td style="width: 284px"><asp:RadioButtonList ID="RadioButtonList1" runat="Server" Height="74px">
             <asp:ListItem Text="Departmentwise" Value="Departmentwise"></asp:ListItem>
             <asp:ListItem Text="Categorywise" Value="Categorywise"></asp:ListItem>
             <asp:ListItem Text="Gradewise" Value="Gradewise"></asp:ListItem>
          </asp:RadioButtonList>
      </td>
</tr>

<asp:GridView ID="dgApplicable"
 runat="server" AutoGenerateColumns="False" Width="136%"
 AllowSorting="True" AllowPaging="True" PageSize="20" onrowediting="dgApplicable_RowEditing"
 onpageindexchanging="dgApplicable_PageIndexChanging" Height="127px"
         style="margin-right: 75px"
         onselectedindexchanged="dgApplicable_SelectedIndexChanged" >
 <Columns>
 <asp:BoundField DataField="Code" HeaderText="Code" SortExpression="Code ASC"></asp:BoundField>
 <asp:BoundField DataField="Category" HeaderText="Category"></asp:BoundField>
 </Columns>
 </asp:GridView>                 


 

Answers (4)