get value of item from dataview

  • Thread starter Thread starter Jerry
  • Start date Start date
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
 
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
 
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
 
Back
Top