My application has several text-box controls bound to a DataSet.
It's easy to navigate the data incrementing or decrementing the
BindingManager Position (first / previous / next / last --> easy, ok).
What do I want? I want to write on one of those text-box controls instead of
clicking prev/next buttons. I mean, if one of those boxes shows the
auto-numerical key of the current row (let's say it shows "1"), I want to be
able to write "14" and get the whole collection of data-bound-controls
showing the values of the row whose auto-numerical key is 14. Then write "7"
and get the whole collection of data-bound-controls showing the values of
the row whose key is 7. And so on.
To get this I use the "TextChangeEvent".
The code I think I would need for this event is something like this:
1- Find the row whose key is 14 (for the example) [DataTable.Rows.Find(14)]
2- Get its "Position" at the collection (let's say it's the 9th. element)
[a dataset is a collection controlled by BindingManager...]
3- Assign it to the BindingManager Position [BindingManagerBase.Position =
So, my problem is with point 2:
How do I know the "Position" (in order to assign it to the BindingManager)
of the row that I am able to Find within the DataSet?
Or, is there another way to get the current item changed, so that the
CurrencyManager notifies the bound controls? (Because
"DataTable.Rows.Find(14)", wich gives me the DataRow I look for, does not
raise "current item changed").