datarowview vs datarow
am 28.01.2008 16:21:05 von 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
RE: datarowview vs datarow
am 28.01.2008 17:58:02 von rodchar
sorry bout this, i had a brain cramp. the datasource was using a dataview of
the typed dataset. problem solved.
"rodchar" wrote:
> 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
>
>