Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by jp on Oct 19, 2007 15:12
open dhtmlx forum
Colors

Hi, how can i set a background color of a single cell with javascript and with xml. I need the same for a row, with javascript (i found setRowColor) and xml.

Thanks in advance

Answer posted on Oct 22, 2007 01:50
For row you can use

<row style="background-color:red"
or
    <row bgColor="red"
which are equal to
    grid.setRowColor(...

For cell you can use

grid.cells(i,j).setBgColor("red");

from XML  you can use
    <cell class="red"..      //red is name of css class which need to be defined in html file
    <cell style="background-color:red"   //such syntax works for latest build only