Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
how to dynamic search in c# 2010?
i want to search in DB dynamically so that show the results in the dataGridview on form.please help.
thanks
Posted
Comments
Prasad_Kulkarni 27-Jul-12 2:10am    
Dynamically means?
Not clear please elaborate.

1 solution

Here is a good tutorial that shows how to use DataGridView to retrieve and display data from an SQL DB:
http://www.dotnetperls.com/sqldataadapter[^]

Here is another tutorial on DataGridViewin general:
http://www.dotnetperls.com/datagridview[^]

When you say "dynamically" i take it you mean that you want it to appear to "refresh" or "update" to reflect changes without the user's intervention.

I would suggest you use a system timer at a 1 second interval, and on timer overflow:
1. retrieve all data from the DB
2. remove all content from the DataGridView
3. write new contents in
 
Share this answer
 
Comments
FM7 2-Aug-12 23:05pm    
very good,useful,thanks
Shaunak De 3-Aug-12 4:41am    
If it solves your problem, please rate the answer. Thanks :)

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