Click here to Skip to main content
15,891,692 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have two tables in database..
I have two radio buttons and a gridview with edit, delete and update options with my design ..
In each radio button click, I have to display the table in the gridview and should possible to edit, delete and update.
Posted
v4
Comments
Kaushik Saha from Kolkata,India 23-Jul-12 5:14am    
Give some code snippets.
_Amy 23-Jul-12 5:44am    
What have you done yet?
AshishChaudha 23-Jul-12 5:48am    
what you have done so far..please try by your self first..if you get stuck then ask for help.
Sebastian T Xavier 23-Jul-12 6:43am    
Show us your code

1 solution

If I am not wrong, you want to load the tables on GridView according to the radio button click.

For Example -
If you have two radio buttons like -
. Students
. Teachers.

You want to say,
- if you select radio button "Students", then "Students" table gets loaded in
GridView and you can be able to edit, delete and update.
- if you select radio button "Teachers", then "Teachers" table gets loaded in
GridView and you can be able to edit, delete and update.

To achieve this
- Include the radio buttons inside one radio button list.
- Then you have to bind the GridView in a function called by the event "OnSelectedIndexChanged" of Radio Button List, which is called when we select any value of Radio button List.

Now you need to check the selected Item of the radio button list and bind the required table accordingly.

Refer this blog[^] to know thw usage.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900