I have got 2 Forms. The first one contain Data Grid View 1 and the second one contains Data Grid View 2 and Button. I want code, using C#, that when the user clicks on Button,
the data in the Data Grid View 2 is taken and displayed in Data Grid View 1. Can anyone can tell me how to do this in details please.
I have got 2 Forms. The first one contain Data Grid View 1 and
Share
Depending on what you’re really trying to do, I would suggest to make use of the
BindingSourceclass in both your forms, and bind them according to what you need with yourDataGridviews, then expose yourBindingSource.DataSourcethrough a Form property which will allow you to get and set the datasource outside of your Form, hence allowing you to change or update your[DataGridView.DataSource]4 property through this Form’s property.