Any suggestions? thanks..
dgv1 to dgv 2
Dim column As New DataGridViewTextBoxColumn
Dim newCol As Integer = 0
For Each row As DataGridViewRow In DataGridView1.Rows()
If row.Cells(5).Value.ToString().Equals("I") Then
DataGridView2.Columns.Insert(newCol, column)
With column
.HeaderText = "R1"
.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
.ReadOnly = True
End With
For rows As Integer = 0 To DataGridView1.Rows.Count - 1
DataGridView2.Rows.Add(DataGridView1.Rows(rows).Cells(5).Value)
Next
Exit For
End If
Next
0 comments:
Post a Comment
Thanks