I am developing a web portal using the ASP.NET framework in C# with a MySQL database server. My problem is that in one page there are 4 radio buttons (SAP Info, DB info, OS info and License Info) and one grid view.
I want to know how to display records in a single grid view when any one radio button is selected. For example, if I select the SAP info button, the info about SAP should be displayed in grid view from database. Similarly, if I select OS info button then info about OS should be displayed in grid view and same for other 2 buttons. How can I do this?
When u click any of your radio button, go to your db and get the specific data (according to your checked radio button) and than bind your grid again from the new data source.
It is good approach to use the stored procedure and pass a parameter of @InfoType with datatype tinyint or int.
Edited:
add the row command event like that
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" OnRowCommand="GridView1_RowCommand">and in your c# code create an event like that