We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid Grouping Control and System.Windows.Forms.BindingNavigator

I was wondering if anybody has any experience with using the System.Windows.Forms.BindingNavigator with the Grid Grouping Control? When I first load and bind the form it works ok but after I sort one of the columns in the Grouping Grid, the Binding Navigator still uses the record order it originally loaded. Does anybody know a trick to have the BindingNavigator adjust it's record order from the Grouping Grid after it sorts. I am hoping to use the convenient features of the Grouping Grid without having to capture the Header clicks and do the sorting in the BindingNavigator.

Any ideas would be appreciated.
Thanks,
Scott Numbers

3 Replies

NR Nirmal Raja Syncfusion Team May 24, 2010 03:29 PM UTC

Hi Scott,

Thank you for your interest in Syncfusion products.

I have implemented a BindingNavigator on the GridGroupingControl through BindingSource,and I am unable to reproduce the mentioned issue of not sorting. Please provided us a sample or try to reproduce the issue in the provided sample.

Please refer the sample attached below:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=BindingNavigator741848647.zip

Let me know if you have any queries.

Regards,
Nirmal


DA David December 11, 2017 10:02 PM UTC

The provided exmple does not work with the binding navigator (at the top), but does work with the one at the bottom of the grid. As soon as you sort, it gets out of sync if you press the next/previous arrows


AR Arulpriya Ramalingam Syncfusion Team December 12, 2017 04:40 PM UTC

Hi David, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed the attached sample. In order to update the record navigation bar of grid when the records are added through the BindingNavigator, the AddingNew event of BindingSource can be used. In that event the update() method of RecordNavigationBar can be used to update the records count of grid. We have modified the sample as per your requirement. Please make use of the modified sample and below code, 
 
Code example 
 
 
BindingSource bind = new BindingSource(); 
bind.DataSource = GetTheGridTable(); 
//To set the DataSource of the grid. 
this.gridGroupingControl1.DataSource = bind; 
//To bind the data source of grid with BindingNavigator. 
this.bindingNavigator1.BindingSource = this.gridGroupingControl1.DataSource as BindingSource; 
this.gridGroupingControl1.ShowNavigationBar = true; 
 
//Event triggering 
this.bindingNavigator1.BindingSource.AddingNew += new AddingNewEventHandler(BindingSource_AddingNew); 
 
//Event customization 
void BindingSource_AddingNew(object sender, AddingNewEventArgs e) 
{ 
    //To update the RecordNavigationBar when the records are added through BindingNavigator 
    this.gridGroupingControl1.RecordNavigationBar.Update(); 
} 
 
 
 
Note 
Please let us know if we misunderstood your requirement. 
 
Regards, 
Arulpriya 


Loader.
Live Chat Icon For mobile
Up arrow icon