get value of item from dataview

J

Jerry

Hi,

If a dataview is based on a table and I filter this view

dataview1.RowFilter = "Name Like '" & strCriteria & "'"

where Name is a field in the datasource table, I get a
subset of this table. If I have an ID column, how can I
retrieve the ID values of the filtered rows? Say the
table has 10 rows and I filter it so that the subset has 3
rows. How can I retrieve the values of the ID column for
these 3 rows? Can I iterate through this subset, how?

Thanks,
Jerry
 
C

Cor Ligthert

Hi Jerry,

You do not believe that it is this simple
\\\
dim myId as string
For i as integer = 0 to dataview1.count - 1
myId = dataview(i).item("ID").toString ' this ID is case sensetive
next
///
This routine is of course nuts, however as sample

I hope this helps?

Cor
 
J

Jerry

Hi Cor,

I see what I was missing. I was trying

i= dataview.Item("ID")

which was giving me an error (well, something like this).
I left out the row index part.

Thanks for your help.

Jerry
 

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