views:

113

answers:

0

I have a DataSet.DataTable based on a StoredProcedure. I connect it to a BindingSouce

BS = New BindingSource BS.DataSource = DSCustomerPossibleRoutes BS.DataMember = "CustomerPossibleRoute"

I then set a filter on the BS

BS.Filter = "DayOfWeek=" & CType(DaysDates.DayOfWeek(DateTimePicker2.Value), String) BS.ResetBindings(True)

Now I can do a BS.Position=BS.Find() But how does that allow me to get the data it is attached to? When I do DS.Tables(0).Rows(BS.Position).Item("CustomerID") it does not allway return the correct value. Am I doing this wrong?

I tested this with DS.Tables(0).Rows(BS.Find("Customer",20)).Item("CustomerID") and expect that it return the correct value but I'm finding in my case it only works from about row 3 or 4 anything bellow that I get wrong values.