By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,462 Members | 3,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,462 IT Pros & Developers. It's quick & easy.

cannot use DataRowView in ONItemBound event if datagrid datasource is Datareader?

P: n/a
private void dgrid_OnItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType ==ListItemType.Item||e.Item.ItemType
==ListItemType.AlternatingItem)
DataRowView drv = (DataRowView)e.Item.DataItem;
it caught error.

but if I change the datasource to DataTable then it is ok.

Is it true we cannot use DataRowView in ONItemBound event if datagrid
datasource is Datareader?

thanks
-Rockdale

Jun 7 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.