O
offwhite
When looping over items in the RowDataBound event for a GridView
(ASP.NET) I can access e.Row.DataItem which shows as a DataRowView.
The following code allows me to access the data for that row.
e.Row.DataItem, System.Data.DataRowView).Row.Item(0)
Is there a better way to access that data? This syntax looks very ugly
and potentially error prone.
Ideally I would simply use code like this...
e.Row.DataItem("id")
But I cannot seem to do that.
Brennan Stehling
http://brennan.offwhite.net/blog/
(ASP.NET) I can access e.Row.DataItem which shows as a DataRowView.
The following code allows me to access the data for that row.
e.Row.DataItem, System.Data.DataRowView).Row.Item(0)
Is there a better way to access that data? This syntax looks very ugly
and potentially error prone.
Ideally I would simply use code like this...
e.Row.DataItem("id")
But I cannot seem to do that.
Brennan Stehling
http://brennan.offwhite.net/blog/