Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can i do dataview cannot be converted to datatable?
Message
 
 
À
07/06/2011 03:53:15
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01513301
Message ID:
01513311
Vues:
41
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform