When generating my grid XML, I’m setting the background row color for rows that meet a specific condition.
I’m using FF2 and dhtmlxSuite_pro_2008Rel2_80512.
It doesn’t work at all to set the row color using bgColor…
eg.
It does work if I use style…
eg
BUT, then the row color won’t change to the grid row selected color when the row is selected. The row color always remains the color I assigned in XML, for both hovering and when selected in grid view.
I had this working fine when using script to assign the row color after grid load, but it would be much more efficient to assign row color in xml during grid load. Is there a solution for this problem?
The issue caused by color priority. The color set by “style” attribute has higher priority, so it will be shown for all states of row.
By default the bgColor prorepty can be used to set background color of row
Please check attached sample.
If it still not work in your case - please provide any kind of sample where issue can be reconstructed ( you can send it directly to support@dhtlmlx.com )
1217238292.zip (84.4 KB)
Yea, i do have the same problem, on the attachment that you sent,
if you add a skin type
mygrid.setSkin(‘light’);
and then on the xml if you set first three rows with bgColor = “red”
you will have the first and the third color changed to red but not the second, because second is being overridden
by the css.
div.gridbox_light .odd_light{
background-color:#E5F2F8;
}
which makes the every odd color to a different color and it over rides the bgColor attribute
in the xml…
so i was wondering if there a solution for it…
Thank you…
On further digging i found out the inbuilt function
grid.setRowColor
was not setting the color on the row but to every child of that dom element,
so changing the color in each cell did solve my problem…
Thanks