I figure out you're trying to use the BindingContext object because you want to move around in your data source. Well, here goes how would you do that:
Every Form has a BindingContext object through which you can move around in your data source. All you need is to pass to this property (indexer in C# and default property in
VB.NET) the data source and (optionally) a string identifying the data member within your data source. So, for example, if you have a DataSet object named northwindDataSet and it contains two tables named Customers and Orders and you want to move to the next record of the Customers table, write code like this:
Code:
// Move to next record
this.BindingContext[northwindDataSet, "Customers"].Position++;
// Move to previous record
this.BindingContext[northwindDataSet, "Customers"].Position--;
// Move to first record
this.BindingContext[northwindDataSet, "Customers"].Position = 0;
// Move to last record
this.BindingContext[northwindDataSet, "Customers"].Position = northwindDataSet.Tables["Customers"].Rows.Count - 1;
I hope this helps.
Regards,
ejan