dataview find method return value is not zero indexed?

  • Thread starter Thread starter jai hanuman
  • Start date Start date
J

jai hanuman

it seems the find method is returning 1 for the first
row (instead of zero)? is this a known thing?

the doc sez
"The index of the row in the DataView containing the sort key value
specified;"

weren't indexes zero based?

thanks...
 
jai hanuman said:
it seems the find method is returning 1 for the first
row (instead of zero)? is this a known thing?

the doc sez
"The index of the row in the DataView containing the sort key value
specified;"

weren't indexes zero based?

oh sorry was using view and then looking in the table for the
(typed) row. need a tea break.

a question which is coming out of this problem - the view gives
me index into the view. how do i get the index into the original
table for the DataRowView (to get the typed datarow)?
 
Just use

i = dv.Find("123")
dim dr as datarow = dv.item(i).row


This will give you the datarow that the datarowview is "tied" to.
 
Back
Top