1

Possible Duplicate:
Looping through rows in a DataView

I have created a dataview from a datatable.

My question is how can I loop inside the dataview?

I know that in a datatable I can perform a loop like this:

For Each oRow as DataRow in iDataset.Tables("tableName")
     Msgbox oRow(0).ToString
Next

How do i do that for a DataView?

Community
  • 1
  • 1
SkyDrive
  • 1,445
  • 4
  • 15
  • 24

1 Answers1

5

try this:

For Each rowView As DataRowView in dataView
    Dim row As DataRow = rowView.Row
    Msgbox oRow(0).ToString
Next
John Woo
  • 258,903
  • 69
  • 498
  • 492