Many aspects of grid can be customized to achieve custom look and feel. Default settings can be adjusted in css file, custom settings for some rows|cells can be provided in XML or by js commands
Grid has a set of predefined skins, which can be enabled for the grid, by using
mygrid.setSkin(skin_name);
Each skin has its own set of css rules, which applied to the grid. Those rules can be adjusted directly in dhtmlxgrid.css, or as more update-safe uproach - redeclared in separate css file or directly on the html page.
More advanced way to define custom look of grid - creating of custom skin.
In some cases it may be necessary to skip default skin styles as is, but modify styles for some specific grid on page. It can be done by using ID based css selectors in custom styles, or by JS API
The following method is responsible for modifying the default style of the grid and its elements:
//grid.setStyle(ss_header, ss_grid, ss_selCell, ss_selRow); grid.setStyle("background-color:navy;color:white; font-weight:bold;", "","color:red;", "");
Parameters:
There is a method that allows to set different styles for odd and even grid rows:
.even_row{ background-color:#22FF44; } .odd_row{ background-color:#41964e; }
grid.enableAlterCss("even_row","odd_row");
Parameters:
Some skins ( modern, light, dhx_blue ) has native css rules for even/odd rows