Hello,
My grid has 7 columns; Monday thru Sunday. These are all checkbox columns that allow user to select one or more columns. I've implemented these checkboxes using render call back function and cellClick event as follows:
{
title: "Mon", dataIndx: "exceptionMon", width: 30, dataType: "boolean", align: "center", type: "checkbox", editable: false,
render: function (ui) {
return "<input type='checkbox' " + (ui.cellData ? "checked='checked'" : "") + "/>";
}
, hidden: false
}
$("#grid_array").pqGrid({
cellClick: function (evt, ui) {
if (exceptionDays.indexOf(ui.dataIndx) > -1) {
var exceptionVal = ui.rowData[ui.dataIndx];
if (exceptionVal == undefined || exceptionVal == false) {
ui.rowData[ui.dataIndx] = true;
} else {
ui.rowData[ui.dataIndx] = false;
}
}
}
});
This works fine with only one problem. Because I've used cellClick event, the properties are set to True/False even if the cell is clicked and not the checkbox. Is there a way to set properties to true or false only when the checkbox is clicked?
Please let me know if you need additional information.
Thanks in advance.