Applying CSS to Grid


When the grid is loaded.I want to apply different colors to rows of the grid depending upon some value of the grid.Is it possible?

Sajin B


grid type allows to set templateCss - template for css class that will be add to row className. For example if you want to highlight odd rows, you may use the following approach:

<style> .odd{ background-color:#ededed; } </style> ... dhx.ui({ ... view:"grid", type:{ templateCss:function(obj){ return"odd":"" } }, ... });