将值从GridView传递给另一个

  • 本文关键字:另一个 GridView vb.net
  • 更新时间 :
  • 英文 :


如何使用GridView Dev Express更改此代码中的DataGridView。。

For I = 0 To DT.Rows.Count - 1
DataGridView1.Rows.Add()
DataGridView1.Rows(I).Cells(1).Value = DT.Rows(I).Item("Name1")
DataGridView1.Rows(I).Cells(2).Value = DT.Rows(I).Item("Name2")
DataGridView1.Rows(I).Cells(3).Value = DT.Rows(I).Item("Name3")
DataGridView1.Rows(I).Cells(4).Value = DT.Rows(I).Item("Name4")
DataGridView1.Rows(I).Cells(5).Value = DT.Rows(I).Item("Name5")
Next

我认为您引用的两个网格控件都应该像这样使用:

DataGridView1.DataSource = DT
devExpressGridView.DataSource = DT

最新更新