Click here to Skip to main content
16,021,181 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear seniours,
Please tell me how can i show my data from database in gridview on the same form rather than separate form against a click event?
Posted

Hello My Dear Friend..

You can use from a Event :sigh:
 
Share this answer
 
It's just that, on click event you can populate datatable/dataset
and assign it to gridview as datasource. Render the grid using databind event.

You don't need two forms to show gridview and have click event. Both can reside on the same form. Please go through this article. It is little advanced where you can edit the gridview but will give you an idea of how to use gridview on the same page where a button click event happens:
GridView all in one[^]
 
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