If you don't want to read the drivel in my main message body here is the
question at the end. How do you find a string in a column and make the
BindingNavigator Navigate to the correct row?? Thanks, --max
I added a table (logouts) to a form from the datasource. This added the
LogoutsBindingNavigator, LogoutsBindingSource, and LogoutTableAdapter.
This is all find and dandy, now I want to find a record without scrolling to
the record. Any ideas how??
I put a textbox and button on the BindingNavigator, and search the table for
the string in the textbox but the row index in the Table IS NOT the row that
needs to be presented. I was looking through what is available from
Me.Dataset1.Logouts (probably created when I dropped the Logouts table on the
form) and I found a functional reference FindByName (name is a field in
Logouts) this returns a LogoutsDataRow. Okay, I can do that, and
Dim lor as LogoutsDataRow = Me.Dataset1.Logouts.FindByName("Smith")
returns the correct row.
But how do I take this information and make the BindingNavigator go to the
correct row??
In the immediate window if I do
?lor
I get amoung other things
....
Log_Out_Date: #4/24/2006#
newRecord: 101
ObjectID: 110
oldRecord: 101
....
ObjectID appears to be the index of the row I find when looking through the
Logouts table, but IS NOT the recordnumber to give to the
BindingNavigators.Position property. But the ObjectID is! but it also looks
like newReocrd, oldRecord and ObjectID ARE NOT available.
So how do you find a string in a column and make the BindingNavigator
Navigate to the correct row??
Thanks,
--max