Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Steve N on Apr 22, 2008 09:04
open dhtmlx forum
setColor() - how to make new color appear immediately

I am using setColor() to set the colors of different columns in my grid. However, I then need to refresh the grid (in this case by doing another loadXML()) to see the new color choices.

Is there a way to see the new colors immediately upon calling setColor(), or a way of redrawing the grid immediately without having to reload the data?

Thanks!
Answer posted by Support on Apr 22, 2008 09:32
The setColumnColor command affect only rows created after command applying.
If you need to apply modification to existing grid you can use something similar to next

mygrid.forEachRow(function(id){
    mygrid.cells(id,INDEX).setBgColor("red")
});


where INDEX - index of column in question