Click here to Skip to main content
15,742,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have dynamic text-boxes. They will be created dynamically based on the available columns in the datagridview1. Now the concern is i want to use these text-boxes as search fields for whole datagridview1 for the corresponding columns. When i enter the values in the text-boxes and click a button, the result should contain the data (rows that contain the keyword entered in dynamic text-boxes) that contains the entered data in text-boxes in the existing datagridview1 into another datagridview2 control.

Pls help me in getting this ASAP.

Thanks in advance :)

Thanks & Regards,
Updated 18-May-10 0:34am

1 solution

Without looking at any code it is impossible to give a specific reply, but what I think you need to do is to create a general delegate that will sort your data based on a keyword and then add the delegate when you create your button, sort of like this

Private Sub ClickHandler(ByVal sender as Object, ByVal e as System.EventArgs)
'Do Work Here
End Sub

'in the routine that creates the button do this
Dim btnFilter as New Button
btnFilter.Text = "Filter"
AddHandler btnFilter.Click ,AddressOf ClickHandler

I hope this is what you were after

Happy Coding
Share this answer
tirumal reddy 18-May-10 7:33am    
Thanks for ur response. But this is not the intended one that i was asking for.
Where is the Filter referring to?
Wayne Gaylard 18-May-10 7:52am    
Sorry the Filter part is just the text for the button. You will need to post some code if you need further help

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