This could work only during the same request when DataGird is databound.
Then you could access the data source row via e.Item.DataItem, that is,
DataItem property of the DataGridItem. By the way, when you bind to
DataSet,DataTable or DataView, type of the e.Item.DataItem is
System.Data.DataRowView (DataView's item type), with DataReader it is
System.Data.Common.DBDataRecord and for other types it is the type of the
custom item.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Lerp" <ad***@officience.ca> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi all,
What's the syntax for creating a row out of the current item in a
datagrid?
Something like this ?
Dim myRow as DataRow = mydataGrid.DataKeys(e.item.itemindex)
Cheers, Lerp :)