Hello...Can anyone please help me with an issue in tab navigation C# win forms? My problem is How to make the grid retain its active or selected row between the tab navigations?
When I navigate to a tab from the current tab or screen that has C# ultrawin grid control, the active or highlighted row is always defaulted to the first row, instead I want to have the same as user selected or active row on the grid.
how can this be achieved?
Thank you
Swetha
Note that there is a property, UltraGrid.DisplayLayout.TabNavigation, which determines how the grid handles tab key navigation. By default, it will cycle through all the rows and then tab to the next control in the tab order.
If you set TabNavigation to 'NextControl', it will always select the next control in the tab order, but the last active row is maintained, so I'm not able to reproduce the behavior you describe here, at least not with a simple project.
The first thing that comes to mind is that the data source to which the grid is bound is reverting the current record to the one associated with the first row in the grid every time the control loses (or acquires) the input focus. You can easily determine whether this is the case by setting the control's SyncWithCurrencyManager property to false, and see if the behavior persists.
Beyond that, we would need a sample or some more details about this in order to figure out what's going on.
Hello Brian, by tabs I do not mean the tab key, I mean how to retain the selected or highlighted values in the grid while navigating through the forms. When I select a row on the grid and open a different form and come back to thr grid the grid automatically refreshes and selects the first row I don't want that to happen I want the selected row to remain the same as before....Please let me know how this can be achieved
Hi Brian, thank you so much for the reply. The problem is that when I navigate away from the tab that has grid and come back to the same tab the selected row is not the one which is selected but the first row is highlighted instead of the one the user selected. Can this be achieved?