Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by TJ on Jul 31, 2008 13:54
open dhtmlx forum
onEditCell change color of cell

Hi,

I am trying to figure out a way to change font-color (or make it underline) of cell that is edited. I see that it is possible to have entire row getting "bold" when edited but is there a way change the format of the edited cell only?

Thanks.

TJ
Answer posted by Support on Aug 01, 2008 01:00

You can access the HTML element of cells as

   grid.cells(id,ind).cell

so you can assign any styles to cell as 

   grid.cells(id,ind).cell.style.color="red";
or
   grid.setCellTextStyle(id,ind,"color:red;");

The moment when cell switched to edit state can be catched by using onEditCell event