I have a Form1, which contains a DataGrid, and a button Search. When I click the search button, another form (Form2) opens, with 2 textboxes and a button Select. When I click the button Select, I want the DataGrid of Form1 to be filled by the values of the 2 textboxes in Form2.
How can I do this?
In the constructor of form2 you pass the Form as a parameter.
Then you can call the Gridview of Form1 and add the textboxes you want to fill to it