I am having a problem making selected rows highlight when using a hierarchical detailgrid display if I perform the selection in code rather than clicking directly on the grid.
Does anyone have any ideas on how to achieve this with minimum code?
Background: I have an application that uses Grid for Net on the main form to provide user with a read-only summary of their data plus it also is a navigation tool ie. by clicking on the appropriate level of the data it provides the context for the sub-functions to work.
The grid has 2 modes; mode 1 is a simple single level list in a single grid and mode 2 is a hierarchical view of the data structure using multiple detail grids.
My problem is that when I refresh the grid I need to re-establish the view as the user last saw it it with respect to sorting, expanded tree, selected rows etc. Now I have some simple routines that now do all this except that on the multi-detailgrid version the selected rows are not highlighted.
On the single grid view the rows are correctly highlighted as the default blue selectionbackcolor and it you click elsewhere on the grid the highlighting is removed and the new location highlighted. To achieve this I just used: GridControl.SelectedRows.Add(dr)
With the multiple detailgrids it seem like I can correctly select the correct rows of the detailgrids, but there is nothing visible to the user to show this. If I manually try to set the background colour to show my selection then it is not removed if the user then selects another row.
Imported from legacy forums. Posted by nufocus (had 2721 views)