DataGridView Alternate Row Style does not working

Answered
0
1

Dear team,

I have my code

Application.Theme.Colors(“table-row-background-even”) = Color.Yellow
Application.Theme.Colors(“table-row-background-odd”) = Color.AliceBlue

in

Private Sub Page1_Activated(sender As Object, e As EventArgs) Handles Me.Activated

But the grid still is with white rows only.

What I am doing wrong?

Kind regards!

 

  • You must to post comments
Best Answer
0
0

Hi,

changing the color definitions is working, but only if the Theme you are using handles the odd and even state for the Table Row appearance.
You can compare Blue-1 (that does handle the states) with Bootstrap-4 (which does not handle the states).
So changing the named colors only have an effect if the theme also uses the states.

Best regards
Frank

  • You must to post comments
0
0

You can add the missing pieces in a theme mixin, see attachment.
Just unzip it and put it into your themes folder.

Best regards
Frank

Attachment
  • mgmst
    • mgmst
    • Jun 9, 2024 - 1:33 pm
    Thank you!
  • You must to post comments
0
0

Thank you!

I am with Bootstrap-4 for a reason. I like it best.

Can something be done so that Bootstrap-4  to support odd and even state for the Table Row appearance?

Kind regards!

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.