Hi Michael,
To alter the current row in the DataGridView when clicking the navigation
arrows of the BindingNavigato r, you should set the DataSource property of
the DataGridView to the BindingSource instance bs, rather than the dataset
instance.
Every data source has a BindingManagerB ase object associated with it. If a
data source is a list, we could change the Position property of
BindingManagerB ase object to change the current item in the data source.
The BindingManagerB ase objects associated with the BindingSource bs and the
dataset instance are not the same one. We could access the
BindingManagerB ase objects using the following code.
BindingManagerB ase bm1= bs.CurrencyMana ger;
BindingManagerB ase bm2 =this.BindingCo ntext[bs]; // bm1 == bm2
BindingManagerB ase bm = this.BindingCon text[this.dataSet11, "TableName"];
// bm1 <bm
When you set the BindingSource property of the BindingNavigato r to bs and
click the navigation arrows of the BindingNavigato r, BindingNavigato r
manipulates the BindingManagerB ase object associated with the
BindingSource. In this case, you should set the DataSource property of the
DataGridView to the BindingSource bs.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.