Struggling to Edit a Cell Value.

Hello All,

I am relatively new to this dhtmlx. I have to edit a value based on a checkbox selection. I am trying to do it. But somehow it throws a an exception. Tried almost all possible options of API. But nothing seems to work.

var x = document.getElementById(“attendance”);
if (x.checked === true) {
var classGrid= getClassGrid();
classGrid.cells(“present”,1).setValue(“Y”);
alert(“done”);
} else {
var classGrid = getClassGrid();
classGrid.cells(“present”,1).setValue(“N”);
alert(“done”);
}

The XML is something like this:

Attendance Y

The debugger keeps throwing a TypeException every time its hits the line, classGrid.cells(“present”,1).setValue(“Y”); or classGrid.cells(“present”,1).setValue(“N”);

I have to edit a value based on a checkbox selection.
Please, try to use the onEditCell event
docs.dhtmlx.com/api__dhtmlxgrid_ … event.html

Wonderful !!! Can you help me do that , please ?

Sorry for dropping off the thread like that. I was a little tied up. Here’s the thing,

I was able to figure out a little bit about the checkbox. I am creating the xml this way for the checkbox:

Present { "1" }

If the value is 1 the checkbox is selected and if 0 it should be unselected.
I was able to get the checkbox to show up, but unfortunately any clicking on it is breaking the validation framework that i implemented. I have a validate button at the top is gets disabled! :smiley:

Unfortunately the problem cannot be reproduced locally.
Could you please, share with a complete demo, where the issue can be reconstructed.