Hi Mark
I have solved the problem in the following way.
1. edit the file
"\Documents\Mendix\hoge\themesource\datawidgets\web\datagrid.scss"
Create a class as shown in the image and reference the parent class.
2. Editing Dynamic Row Class Properties
3. Execution Result
You can try something like this.
.datagrid2{
&:hover,&:focus,&:active{
background-color: lightblue;
font-weight: bold;
}
}
Hi Ryoya,
I had similar requirement recently and ended up in same situation as you. Adding ‘dynamic row class’ to change the background will not work due to ‘display:contents’ style. If you add your logic to ‘dynamic cell class’ instead then it will work (you will need to add it to all the columns) but this worked for me. This is a quick way I found to get around this as I did not had much time to look into this.
Note: If you enabled hiding for columns feature than you will find the last column cell not having the required background, to fix this I added below custom styles.
.column-selector {
background-color: $brand-success;
}
Hope this helps!
If the text thickness changes the class is applied and should work. The only thing I could think of right now why the background doesn’t change is because it was set before in a styling sheet more important than yours.
Have you tried using “!important” for the background? (background-color: lightblue !important;) Maybe this works
hi i have the same problem. have you been able to find a solution in the meantime?