Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Purushottam Dwivedi on Dec 01, 2008 05:18
open dhtmlx forum
Set the backgroundcolor of the grid at the loading time

Set the backgroundcolor of the grid at the loading time of the grid when the cell of 9th or 10 th is blank that cell color is RED

thank you
Answer posted by Support on Dec 01, 2008 07:48
can be done as

mygrid.attachEvent("onRowCreated",function(id){
       if (mygrid.cells(id,8).getValue()=="") ; //indexes start from 0
               mygrid.setCellTextStyle(id,8,"background-color:red;");
       if (mygrid.cells(id,9).getValue()=="") ;
               mygrid.setCellTextStyle(id,9,"background-color:red;");
      return true;
})