Hello,
I've followed your instructions and I now have a cellClick event that I use to
1. change the boolean value and
2. Go into Edit mode for the cell
I have created a custom editor for my boolean cell
It creates an input html control of type check box and I append it to $cell using much the same techinque you use in your examples:
var input = "";
input += "<input type='checkbox' ";
input += "name='" + dataIndx + "' ";
input += "class='" + cls + " grid_cell' ";
//Check it if required
var value = _convertToBoolean(cellData);
if (value) {
input += "checked='checked' ";
}
input += "/>";
var $inp = $(input);
I also put in a handler to respond to the checkbox being selected to mark the cell as saved
and to send some data off to the server so that the back end is also updated
$inp.change(function () {
$(grid).pqGrid("saveEditCell")
//Also send the changed data to the server via ajax
});
The problem I have is that the value in the cell (i.e. ui.rowData[ui.column.dataIndx])
is a valid boolean prior to calling $(grid).pqGrid("saveEditCell") i.e. true or false.
However, after I call $(grid).pqGrid("saveEditCell"), ui.rowData[ui.column.dataIndx] changes
to 'on' (irrespective of whether the checkbox is checked or not)
I'm not sure what is going wrong and why the cell data is not storing the correct value.
Can you help?