Defining some table rows with hover style

1
0

Hello everyone,

 

I’m trying to have a DataGridView with mouse over hover style so the rows change their background color.

1. I found this: https://wisej.com/support/question/row-mouse-hover-backcolor I had to download the theme to find what css to add:

"css": "{\"hover\":{\"backgroundColor\":\"darkgray\"}}"

I did that via the Themebuilder and it works. But now every table in the theme has that. I created a new Appearance and inherited the Table row, but I can’t use the new Appearance, because Table Rows have no Appearance Key property.

2. I also tried using the CssStyle of the DataGridView. Adding just backgroundcolor shows the change immediately in the Designer, but I can’t use something like this https://stackoverflow.com/questions/5492900/changing-background-colour-of-tr-element-on-mouseover I assume because the css style is not for the row, just for the table and I can’t redesign other elements in this property.

3. I also tried using this https://docs.wisej.com/docs/controls/extenders/stylesheet added navi-table as CssClass for the datagridview and defined something simple like this in the styleSheet.Styles:

.navi-table {
 background-color:red;
}

Just as a Test, but it does nothing.

 

Where am I going wrong?

  • You must to post comments
0
0

Hi Sascha
Colud you please explain in more details your goal
1.- Have some grids with all rows with custom hover style
2.- Have some grids with some rows with custom hover style
3.- Other
Better if you could attach a runnable sample with your trying cases

Regards

  • Sascha Lorenz
    Sorry that I wasn’t clear enough. The 1 is my goal.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.