dataview filter & for-loop

A

Agnes

I got a large dataview and want to filter some data
and use the for-loop to list the data, however, it seems myThought is wrong.
All the data is list.

dvHBL.RowFilter = "jobno='" & strJobno & "' "
For Each drHBL In dvHBL.Table.Rows
tnjob.Nodes.Add(drHBL.Item("jobno") <-- all data is list
regardless the rowfilter
Next
 
G

Greg Burns

For Each r As DataRowView In dvHBL
tnjob.Nodes.Add(r.Item("jobno").ToString)
Next

untested
 
C

Cor Ligthert

Hi Agnes,
dvHBL.RowFilter = "jobno='" & strJobno & "' "
For Each drHBL In dvHBL.Table.Rows
tnjob.Nodes.Add(drHBL.Item("jobno") <-- all data is list
regardless the rowfilter
Next

Here you say only that you have to take the table from the dataview to go
through.As solution I have nothing to add to the answer from Greg.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top