Login Register

I need to change the background color of an editable cell on update - SOLVED

I am stuck, the requirement is when the user edits a cell and updates it, I need to change the cell background color to green ..... to visibly keep track of changes he made on the grid. how can i achieve this.

I tried this snifflet, but no luck.

function onCellContentChange(originalStore, newValue, rowIndex, colIndex) { 
    console.debug("rowIndex:"+rowIndex+" colIndex:"+colIndex+" newValue:"+newValue);
    console.debug(grid.views.views[0].getCellNode(rowIndex,3));
    grid.views.views[0].getCellNode(rowIndex,3).cellStyles="background:green;";
    grid.update();
};
dojo.connect(grid, "doApplyCellEdit", dojo.partial(onCellContentChange, originalStore));

still struggling to get this

still struggling to get this working........... has anyone tried this......

changing the background color of a cell on update

I've only bothered with changing the row's background by connecting to onStyleRow(). For cell level color changes, I'd probably look at doing custom formatters for the editable cells.

can you though some more light on the approach or any links.....

Thanks,
Ravi

Finally fixed -- follow this