I want to copy from one datagridview to another datagridview.
I tried the code below but I still have all data in the first columns :
For c = 0 To Re
I Hope this work for your project.
DataGridView1.Columns.Clear()
For Each Col As DataGridViewColumn In DataGridView2.Columns
DataGridView1.Columns.Add(DirectCast(Col.Clone, DataGridViewColumn))
Next
For rowIndex As Integer = 0 To (DataGridView2.Rows.Count - 1)
DataGridView1.Rows.Add(DataGridView2.Rows(rowIndex).Cells.Cast(Of DataGridViewCell).Select(Function(c) c.Value).ToArray)
Next