Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i do dataview cannot be converted to datatable?
Message
 
 
To
07/06/2011 03:53:15
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01513301
Message ID:
01513311
Views:
40
>Hi all,
> I use vb.net. I don't know compiler say error . Valus of type System.Data.DataView cannot be converted to System.Data.DataTable.
>Anyone know how can i do, thank you ......
>
>
>
>Dim dv1 As DataView
>
> sadapt.Fill(WilsonDataSet, "TempRight")
>        dv1 = New System.Data.DataView(WilsonDataSet.Tables("TempRight"))
>        treeGridView2.DataSource = dv1                  'error in this
>
>
>
>
As far as I recall and the error seems to imply, you need to use DataTable as the DataSource, not the DataView.

So, will this work (just a guess)?
treeGridView2.DataSource = dv1.DataTable[1]
?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform