datarowview vs datarow

R

rodchar

hey all,

DataRowView drv = (DataRowView)((GridViewRow)lbl.NamingContainer).DataItem;

i found this snippet on the net which works correctly in its context. It's
datasource is coming from a Typed DataSet.

Well, i modified the GridView's DataSource to use an UnTyped DataSet but i'm
getting an error saying
"Unable to cast object of type 'System.Data.DataRow' to type
'System.Data.DataRowView'.

Can someone please confirm why this is so? or if this makes any sense?

thanks,
rodchar
 
R

rodchar

sorry bout this, i had a brain cramp. the datasource was using a dataview of
the typed dataset. problem solved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top