Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
Active row display not in sync with binding navigator and sorting
posted

Here I go:

I have a Winform Ultragrid databound to a bindingsource which is also bound to a bindingnavigator. Anything code related uses the bindingsource.current object. The Grid is set to SelectTypeRow = none so I only have to deal with one row at a time (the active row). Since it seems when you sort the Grid it does it independent of the underlying datasource, I have captured the sort event and perform a sort on the datasource as well.

When I advance the binding navigator the grid shows the correct active row highlighted. However, when I sort, the bindingnavigator shows lets say record 10 selected and the bindingsource.current shows record 10 selected, but the active row in the Grid is showing the "OLD" record 10 in the Grid. When you navigate up or down, the grid refreshes correctly to the next active record.

Example:

Sorted asc shows "BOB" active

Sorted desc should show "zippy" now, but still shows "bob" until you navigate which then selects the next record which is now "zippy 2" not "bob 2" (Hope I make sense here).

I guess my problem is: How do I get the grid to show the active row in sync with the current bindingsource and bindingnavigator on sort?

This problem does not exist if you use a DataGridView. Although I think the UltraGrid is superior in every way :)

Parents Reply Children
No Data