I’m here again asking questions. I hope somebody would put some effort in answering this question.
So I have a datagrid view which had values from my database. I have a search button in my form which opens a new form and then there, there is a textbox which you can write the string that you want to search. The question is, How can do that to search and update my datagridview.
for ex. My datagrid view has the following values:
name:
adam lewis,
adam sandler,
justin bieber,
rebecca black
if i search only “adam” after I clicked ok and that 2nd form gets closed
my datagrid view will update and will only show names which has adam on it.
name:
adam lewis,
adam sandler
**My Datagrid’s values is bound by a datatable.
Just comment below if you don’t understand the question and I will put pictures of my gui if that will help. THANK YOU VERY MUCH STACKOVERFLOW!!
it looks like this…


Here’s a video example:
http://www.youtube.com/watch?v=1OjZwBqVSVI
What part of it do you need help though? The general idea is this, you want to be able to control your main form from your search form. You can do this:
In your main form you do 2 things implement UpdateDatatable and add an event handler on search button click:
In your search form:
Hope this helps