PC Review


Reply
Thread Tools Rate Thread

datarowview vs datarow

 
 
rodchar
Guest
Posts: n/a
 
      28th Jan 2008
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


 
Reply With Quote
 
 
 
 
rodchar
Guest
Posts: n/a
 
      28th Jan 2008
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
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Distinguish 2 situations when a DataRow in Detached state; Or why not make the data row intact after being added then removed from a dataRow collection? Ryan Liu Microsoft C# .NET 0 7th Jun 2006 02:14 AM
<DataRowView> VERSUS <DataRowView.Row> [tridy] Microsoft ADO .NET 2 31st May 2005 06:49 AM
What is the difference between DataRow and DataRowView ad Microsoft C# .NET 1 19th Feb 2005 05:02 AM
DataRowView getting the correct DataRow... Doug Microsoft ADO .NET 0 15th Jul 2004 05:43 PM
DataRowView To DataRow Jim Heavey Microsoft ADO .NET 1 19th Jan 2004 12:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:55 AM.