You could use a module to send data to both datagridviews
Please provide your code and highlight where you are facing problem or what error you are getting. please be specific.
Edited 1 Year Ago by zinist
If I understand you correctly maybe this link can help you:
or using this sample code:
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load initializeDgv1() initializeDgv2() End Sub Dim tableOfDgv1, tableOfDgv2 Private Sub initializeDgv1() tableOfDgv1 = New DataTable() tableOfDgv1.Columns.Add("Dgv1_Column1") tableOfDgv1.Columns.Add("Dgv1_Column2") dataGridView1.DataSource = tableOfDgv1 End Sub Private Sub initializeDgv2() tableOfDgv2 = New DataTable() tableOfDgv2.Columns.Add("Dgv2_Column1") tableOfDgv2.Columns.Add("Dgv2_Column2") dataGridView2.DataSource = tableOfDgv2 End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click tableOfDgv2.Clear() Dim table1Value As DataRow For i As Integer = 0 To DataGridView1.Rows.Count - 2 table1Value = tableOfDgv2.NewRow() table1Value("Dgv2_Column1") = DataGridView1.Rows(i).Cells("Dgv1_Column1").Value.ToString() table1Value("Dgv2_Column2") = DataGridView1.Rows(i).Cells("Dgv1_Column2").Value.ToString() tableOfDgv2.Rows.Add(table1Value) Next DataGridView2.DataSource = tableOfDgv2 End Sub
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...