Click here to Skip to main content
16,019,593 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,

I have one textbox and one button and I want to search the data from my sql server database and then show the result in a grid. The grid has to be hidden initially and when I click the search button, it should show up and display the results. Then, when I click on anyone of result from grid, it will populate clicked data into second grid.
Can anyone tell me how to do this?
Any small help is appreciated.
Posted
Updated 22-Nov-10 7:18am
v2

Steps:
1. Search panel - a textbox & a button
2. On button click, use the textbox text, form a search query, hit DB and get back data
3. Bind this data to datagrid and set its visibility to true
4. On row selection event, trap the row unique identifier and fill the values of that selected row in another panel/grid. Make the visbility of this new panel/grid to true.

Done. Try!
 
Share this answer
 
Comments
Rohit.Net100 22-Nov-10 13:35pm    
Thank you. Really Helpful.
Rohit.Net100 23-Nov-10 9:11am    
On BtnClick, what code should i put to hit DB and get the data.
Any sample code is helpful.
Dalek Dave 23-Nov-10 10:35am    
Good Call.
This should get you started.
 
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