I have an UltraGrid set up so that the user can select multiple rows at once. I want the selected rows to all be highlighted the way the active row is, however changing the BackColor properties of the Selected Rows only changes the color of the border around the cells which is hard to see:
I can change the border color by modifying the DisplayLayout.Override.SelectedRowAppearance.BackColor property, but I need the entire row to be highlighted. How can I do this?
Digging up an old thread because this is the same issue I'm having.While this solution does work, I'm curious why this is required for some styles but not others. I've dug through the style settings trying to figure out why it works on one and not another to no avail. I'd much rather alter the file than create a draw filter if it could be avoided.On some of the themes, Office 2013 dark gray being an example, you can reset Cell and GridCell then whatever is in Row -> GridRow -> Selected will work. In other themes, Metro for example, you can reset Cell, GridCell, and Row and it still won't use the GridRow -> Selected settings -- something else is taking precedence. Is there anywhere a definition of these hierarchies is described or some way to, with consistency, be sure that the GridRow -> Selected AppStylist setting will be applied outside of a drawfilter?
This worked, thank you.
Hello Tyler,
From the image you have posted I assume you have used AppStylist to create a style for your grid. So, in order to change the appearance of the selected rows you need first to modify your style. Open your style in the AppStylist and set background colors for the selected and active state of the GridRow. Then you need to use DrawFilter to change the appearance of the rows when they are selected. When a row is selected the DrawFilter is activated and it changes the appearance of the row using the color you set in the AppStylist. For more information about DrawFilter please review the following link:
http://help.infragistics.com/Help/Doc/WinForms/2011.2/CLR2.0/html/Win_Draw_Filter.html
I’ve implemented this suggestion in a simple sample, and you could run and evaluate it, please see attached zip.
Please let me know if you have any further questions.