我有这个代码将内容从一个DataGridView传输到另一个DataGridView
DailyRecordDataGridView.Columns.Clear()
For Each Col As DataGridViewColumn In datagrid_log2.Columns
DailyRecordDataGridView.Columns.Add(DirectCast(Col.Clone, DataGridViewColumn))
Next
For rowIndex As Integer = 0 To (datagrid_log2.Rows.Count - 1)
DailyRecordDataGridView.Rows.Add(datagrid_log2.Rows(rowIndex).Cells.Cast(Of DataGridViewCell).Select(Function(c) c.Value).ToArray)
Next
但它表明 "当控件是数据绑定时,行无法以编程方式添加到DataGridView"