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
350
Changing appearance of Selected Rows
posted

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?

Parents
  • 2165
    Verified Answer
    posted

    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.

    ChangingAppearanceSelectedRows.zip
Reply Children
No Data