Completed
Last Updated: 23 Apr 2014 06:25 by ADMIN
ADMIN
George
Created on: 04 Apr 2014 13:08
Category: BindingNavigator
Type: Bug Report
0
FIX. RadBindingNavigator - The CurrentNumberTextBox is not updated when the CurrentPosition of the BindingSource is changed from an external source
To reproduce:

Create a BindingSource and set its DataSource. Create a RadBindingNavigator and RadGridView:

BindingSource bs = new BindingSource();
ICollection<Dummy> ds = new List<Dummy>();//generate some data
bs.DataSource = ds;
bs.CurrentChanged += bs_CurrentChanged;


Start the application and you will notice that when you click one of the navigation buttons of the RadBindingNavigator the current number will change, it will also change the current row in the grid. But if you change the row in the grid, the current number in the RadBindingNavigator will not change.

Workaround:

Update the Text manually by subscribing to the CurrentChanged event of the BindingSource:

void bs_CurrentChanged(object sender, EventArgs e)
{
    this.Navigator.BindingNavigatorElement.CurrentNumberTextBox.Text = (this.Navigator.BindingSource.Position + 1).ToString();
}

0 comments