0
我想遍歷gridview中的所有行並從RepositoryLookupEdit中檢索數據。從GridView獲取RepositoryLookupEdit
基本上我想這樣做,但我不知道如何讓RepositoryLookupEdit:
For i as Int32 = 0 to myGridView.RowCount -1
Dim row As DataRowView = CType(myGridView.GetRow(i), DataRowView)
//'This next line does not work
Dim lue As LookUpEdit = row.Item("myColumn").myRepLookupEdit
Dim drv As DataRowView = CType(editor.Properties.GetDataSourceRowByKeyValue(lue.EditValue), DataRowView)
Dim myData As Int32 = CType(drv("myData"), Int32)
Next
這很好,我有一個BindingSource作爲我的數據源,所以我有ctype數據源到我的數據集,然後引用我的數據表 – 2010-07-20 15:22:09