Home All Groups Group Topic Archive Search About

What's wrong with this find on a dataview?

Author
9 Dec 2004 6:13 PM
Aaron Smith
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID
ASC", DataViewRowState.CurrentRows)
Dim iPos As Integer = dv.Find(dr.Item("ID"))
Me.BindingContext(FacilitiesDS1, "Facilities").Position = iPos

That is the code.. dr is DataRow. If dr.Item("ID") = 3, the find will
return position 0, which it should have been 1, and if the ID = 2, it
will return 1, which should have been 0.. The DA has a connection string
that sorts it by name, not ID... Is that where I am running into trouble
here??? ID is the primary key...

Aaron
--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.

AddThis Social Bookmark Button