1
Help for ParamQuery Grid (free version) / Re: Set property true/false on checkbox click and not cellClick
« on: August 30, 2016, 08:48:03 pm »
Perfect! Just what I needed! Thanks!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
{
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;
}
}
}
});
$(document).on("blur", ".pq-editor-focus", function (evt) {
var $grid = $(this).closest(".pq-grid");
$grid.pqGrid("saveEditCell");
});
editModel: { keyUpDown: false, onBlur: 'save', saveKey: '' }
editModel: { keyUpDown: false, saveKey: '' }
editModel: { keyUpDown: false, onBlur: 'save'}
grid.on("pqgridquiteditmode", function (evt, ui) {
//exclude esc and tab
if (evt.keyCode != $.ui.keyCode.ESCAPE && evt.keyCode != $.ui.keyCode.TAB) {
grid.pqGrid("saveEditCell");
}
});