Categories | Question details Back To List | ||
Backgroun color to cell hi, I want to give backgroud color to a cell when the cell is selected in Dhtml grid .Please suggest. Thanks Answer posted by Support on Nov 19, 2008 05:02 can be done as mygrid.attachEvent("onRowSelect",fucntion(id,ind){ mygrid.setCellTextStyle(id,ind,"background-color:red;") return true; }); Answer posted on May 05, 2009 06:12 Above code works for setting background color of a selectedcell. How to reset the color back to original when cell is not selected anymore. Thanks.
Answer posted by Support on May 05, 2009 06:41 >>I want to give backgroud color to a cell when the cell is selected in Dhtml grid Instead of setting color by js code, you can redefine selection color in css, for default skin it will be <style> div.gridbox table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected { background-color:red; } </style> http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Creating_custom_skin.html#grid_cust_skin |