0
我最初有一個gridview編輯列,這將允許我編輯行中的特定值。我其實並不大聲使用數據表作爲對象,然後將我的值轉換爲對象列表。我的問題是,我怎麼能轉換我以前的代碼:在gridview編輯按鈕行中選擇列表的值
Dim rowOfCustomers = GridView1.Rows(e.NewEditIndex)
sCompany = dtCustomer.Rows(rowOfCustomers.DataItemIndex)("Company")
sContact = dtCustomer.Rows(rowOfCustomers.DataItemIndex)("Contact")
sAddress1 = dtCustomer.Rows(rowOfCustomers.DataItemIndex)("Address1")
到我可以用我的清單。沿線的也許一些(除了rowOfCustomer.DataItemIndex部分):
sCompany = listOfCustomer.IndexOf(rowOfCustomers.DataItemIndex)("Contact")