这是我在下面使用的代码
Dim lname As New DataGridViewColumn
lname.Name = "LastName"
lname.DataPropertyName = "LastName"
DataGridView1.Columns.Add(lname)
Dim itrow = New DataGridViewRow
itrow.CreateCells(DataGridView1)
itrow.Cells(0).Value = empcoll.Item(i).LastName <<works
itrow.Cells("LastName").Value = empcoll.Item(i).LastName <<error column name can't be found
我在使用datagridviewrow.cells("column name")
. 任何人都可以启发或帮助我吗?