Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ira Klotzko on Jan 18, 2009 11:23
open dhtmlx forum
set class of cell but it gets overridden (using xml)

I am setting the class of an individual cell as such:
<cell class="yellow">

my style yellow is defined as ... .yellow { background-color:yellow;} ...

I inspect the DOM elements and see the TD element you created as <TD class="yellow" ...>

However, when I inspect the style associated with this TD element, it shows it as overridden by the element:

#prrGrid table.obj td {
background-color:white;
border:medium none;
}

where #prrGrid is the DIV element which loads the XML

I have tried changing your css values to different background colors to find where this table.obj td gets written, but, all to no avail...

Do I have to define my class name differently? td.yellow, or perhaps #prr table.obj td yellow, something along those lines?

Thanks,
Ira
Answer posted by Support on Jan 19, 2009 01:49
It seems that you are using grid.setStyles command, it creates such css rules.
>>something along those lines?
You can 
a) redefine your css class as
 .yellow { background-color:yellow !important;}  

or 
b) use 
#prrGrid table.obj td.yellow { background-color:yellow;}