I am using paramquery grid with asp.net web service as datasource. I have implemented auto save feature from demo:
http://paramquery.com/pro/demos/editing_instantand also added a checkbox selection column to get ids of selected rows to implement custom features. I have used the following demo:
http://paramquery.com/pro/demos/checkbox_idThe auto save feature is working fine but on check/uncheck of checkbox for row selection it marks the row as dirty and posts the data to server. I have tried by setting editable to false on checkbox column but the selection did not work.
How can I make the grid to avoid auto save on row selection using checkbox?
Here is definition of checkbox selection column:
var colM = [{ dataIndx: 'state1', maxWidth: 30, minWidth: 30, align: 'center', resizable: false, type: 'checkBoxSelection', cls: 'ui-state-default', sortable: false, editor: false, dataType: 'bool', cb: { all: false, header: true, select: true }},
---
];
and here is the toolbar definition:
toolbar: {
items: [
{ type: '<strong>' + title + '</strong>' },
{
type: 'button',
label: 'Get Row ID of selected rows',
listeners: [{ 'click': function () {
var $grid = $(this).closest('.pq-grid'),
data = $grid.pqGrid('option', 'dataModel.data'),
checked = [];
for (var i = 0, len = data.length; i < len; i++) {
var rowData = data
;
if (rowData.state1) {
checked.push(rowData.StudentsID);
}
}
//sort the ids.
checked = checked.sort(function (a, b) { return (a - b); })
alert(checked);
}
}]
},
---
]
}
Please check my grid implementation using the following link:
http://digitallogix.net/pqtest/
Thank you