Datagridview AlternatingRowsDefaultCellStyle

0
0

Hi,

it seems there is no “AlternatingRowsDefaultCellStyle” property in Datagridview. By default the alternating background color is light gray.

How can I change back color for alternating rows?

Thx

Stephan

  • You must to post comments
0
0

Hi Stephan,

to add to Alaa´s answer:
You can do this either by modifying an existing theme, creating a custom theme or by creating a theme mixin.

Read more: https://docs.wisej.com/theme-builder/

As an alternative option you can also read/write theme properties by code.
For example if you want to get rid of the alternating row colors in a DataGridView you can use code like this:

 Application.Theme.Colors["table-row-background-odd"] = Application.Theme.Colors["table-row-background-even"];

Best regards
Frank

  • You must to post comments
0
0

Hi Stephan,

You can set the Odd and Even background colors in the ThemeBuilder.

Go to Table Cell -> Odd or Table Cell -> Even and change the color from there!

HTH,
Alaa

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.