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
375
Controlling cell color in the selected row
posted

I have data in a winGrid in which the text in certain cells displays in a specific color. I set the color in the initializeRow event of the grid.  When the row is not selected, I get the correct colors. However, when the row is selected, it displays in the standard colors.  I have tried setting the SelectedAppearance property of the cell in the Initialize Row event but it has no effect.

I've tried several approaches

e.Row.Cells("TaskAction").SelectedAppearahce.ForeColor = Color.red

 

e.Row.Cells("TaskAction").SelectedAppearance.BackColor = Color.Transparent

e.Row.Cells("TaskAction").SelectedAppearance = e.Row.Cells("TaskAction").Appearance

I still get the standard black on blue appearance when selected. What am I doing wrong?