Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raj on Nov 21, 2008 21:40
open dhtmlx forum
Background Color missing

hello,

am setting background color for each cells in dhtmlx grid through xml, when am selecting a particular cell, am missing the background color for the cell

see the code

mIiGrid.attachEvent("onRowSelect",function(id,ind){
mIiGrid.forEachRow(function(id){
mIiGrid.setCellTextStyle(id,ind,"BORDER-LEFT:5px solid red;BORDER-RIGHT:5px solid red;");
})
mIiGrid.setRowTextStyle(id,"BORDER-TOP:5px solid red;BORDER-BOTTOM:5px solid red;");
});

see the image

http://img520.imageshack.us/my.php?image=mligridre7.jpg

Answer posted by Support on Nov 24, 2008 02:19
The setCellTextStyle and setRowTextStyle commands will override default css style assigned to the cell ( old value will be replaced with new one ) 
You can use "class" instead of "style" in css, in such case, the value of setRowTextStyle will be added to css rules defined by class attribute