'Get the item and row objects.
Dim dataItem As ListViewDataItem = CType(e.Item, ListViewDataItem)
Dim rowView As DataRowView = CType(dataItem.DataItem, DataRowView)
' Retrieve the Vendor value for the current item.
Dim intVendorID As Int32 = Convert.ToInt32(rowView("VendorID"))
I want to get the data values in the ItemInserting and the ItemUpdating
events.
Below is how I am getting them from controls on the current record being
inserted or updated.
ItemInserting
Dim ddl As DropDownList =
CType(e.Item.FindControl("ddlPeopleLinkID"), DropDownList)
e.Values("PeopleLinkID") = ddl.SelectedValue
ItemUpdating
Dim ddl As DropDownList =
CType(lvIncExpTrans.EditItem.FindControl("ddlPeopleLinkID"), DropDownList)
e.NewValues("PeopleLinkID") = ddl.SelectedValue
Thank you.
David