sets css styles for even/odd rows
cssE | string | name of css class for even rows |
cssU | string | name of css class for odd rows |
perLevel | boolean | true|false - mark rows not by order, but by level in treegrid (optional, default value: true - treeGrid, false - Grid) |
levelUnique | boolean | true|false - creates additional unique css class based on the row level (optional, false by default) |
.even{
background-color:#22FF44;
}
.uneven{
background-color:#41964e;
}
//a minimal parameters' set:
myTreeGrid.enableAlterCss("even","uneven");
//disable even/odd rows in the grid:
myTreeGrid.enableAlterCss("","");
//color rows in treeGrid by order:
myTreeGrid.enableAlterCss("even","uneven",false,false);
//color rows in treeGrid by level,each row level will have a unique class
//(even_0 - 1st level, uneven_1 - 2nd level, even_2 - 3rd level, etc.)
myTreeGrid.enableAlterCss("even","uneven",true,true);
Back to top