Change cell value if checkbox selected

Hi,

I’m using dhtmlxGrid on RoR. I have a checkbox and an event “onCheck” that gets activated each time the checkbox is checked.

function doOnCheckBoxSelected(rID, cInd, state)
{
if (state==‘1’)
{alert(“date approved”);}

		}

What I want to do now, is to change another cell value when the checkbox is checked. The checkbox is called “Approved” and when people click on the “Approved” checkbox, I want the cell called “Approved Date” to be automatically updated with the current date.

How can I do this, is it possible?

I found how to solve it, it was easier then I thought :slight_smile:

function doOnCheckBoxSelected(rID, cInd, state) { if (state=='1') { grid.cells(rID, cInd+1).setValue("Definitivo"); alert("date approved"); } }

I just had to use the “grid.cells().setValue();”

Hope this helps other people :slight_smile: