Hello
I am using ultragrid with binding navigator. I am binding them as
private void SetGridRows(UltraGrid ultraGrid, MyBindingList<ExtendedCatalogVehiclePickItem> vehicleList) {
bindingSource.DataSource = vehicleList; ultraGrid.DataSource = bindingSource; ultraGrid.Refresh(); bindingNavigator.BindingSource = bindingSource;
}
Now my problem is when i click on the header to sort my grid sorts, but not bindning navigator. How to make grid in sync with binding navigator?
Thank you
I'm not sure that I understand your question, since the BindingNavigator doesn't have any functionality directly related to sorting that I can see. Do you mean that after you sort the grid, navigating the current item through the BindingNavigator doesn't move in the same order that is shown in the grid? If so, this is the expected behavior because the grid does not sort the underlying data source, but it does respect what the CurrencyManager has set for the current position. The only way to get this to work would be to set the HeaderClickAction of the Override object on the grid to be ExternalSortSingle or ExternalSortMulti and to handle the AfterSortChange event of the grid to sort your data source yourself.
-Matt