Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing values in a dataview
Message
From
18/01/2006 12:00:41
 
 
To
18/01/2006 11:45:52
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01088036
Message ID:
01088045
Views:
10
This message has been marked as the solution to the initial question of the thread.
Are you trying to get all the columns or just one? For just one, you can do this (at least with C# ... VB syntax may be slightly different ... maybe an Item somewhere):

myView(0).Row("field")

~~Bonnie



>I know how to do it this way:
>
>
> Dim myDRV As DataRowView
>  Dim i As Integer
>
>  For Each myDRV In myView
>    For i = 0 To myView.Table.Columns.Count - 1
>      Console.Write(myDRV(i) & vbTab)
>    Next
>    Console.WriteLine()
>  Next
>
>
>But how about when I know there is only 1 row in the dataview? With datatables you can do dt1.rows(0)("field") but I can't seem to do the same with a dataview.
>
>Thanks,
>MAC
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform