Required library edition:
Required library file: dhtmlxgrid.js
set even/odd css styles
Note that method should be called after setSkin(skin_Name) method.
<style> .even{ background-color:#22FF44; } .uneven{ background-color:#41964e; } </style> <script> //minimal parameters set: mygrid.enableAlterCss("even","uneven"); //disable even/odd rows in the grid: mygrid.enableAlterCss("",""); //color rows in treeGrid by order: treeGrid.enableAlterCss("even","uneven",false,false); //color rows in treeGrid by level,every row level will have unique class (even_0 - 1st level, uneven_1 - 2nd level, even_2 - 3rd level, etc.) treeGrid.enableAlterCss("even","uneven",true,true); </script>
See also: setSkin, setStyle, enableRowsHover