How to change background color of of rows

0
Hi all I want your help I have a one data grid so I want even rows no background color red and odd one's blue. How can I achive this.  Thanks in advance
asked
1 answers
1

Hi Priyanka,

 

You can update CSS like below. This will update color in alternate rows in grid.

 

if you want to apply to all datagrid in your application then update below code in _mxui.css 

.mx-datagrid tr:nth-child(odd) {

background-color: blue;

}

.mx-datagrid tr:nth-child(even) {

background-color: red;

}

 

if you want to update in specific datagrid alone then add css class in datagrid appearance tab 

 

 

describe the class definition in _mxui.css file like below

 

.oddrow tr:nth-child(odd) {background: blue}
.evenrow tr:nth-child(even) {background:red}

 

 

answered