ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: peterkhoi on October 12, 2020, 04:13:01 am
-
Hello PQ team!
I am creating a screen like this example
(https://paramquery.com/pro/demos33/editing)
that has "edit/update, cancel" column. Further more,
I have to add "check box" column at the first column in the grid,
and "delete button" in toolbar so that user can choose multiple rows for deleting.
My problem is... My check box column doesn't work correctly.
Maybe the reason is
//make rows editable based upon the class.
editable: function (ui) {
return this.hasClass({ rowIndx: ui.rowIndx, cls: 'pq-row-edit' });
}
just one row can be edited (checkbox in that row can be checked) when "edit" button in "edit/update, cancel" column is clicked.
Does anyone know the proper way to do this?
-
Good question!
Yes the global editable callback is the reason for not allowing checkbox column to work.
You can move the editable callback to columnTemplate and add editable: true to the checkbox column which would fix the problem.
columnTemplate: {
//make rows editable based upon the class.
editable: function (ui) {
return this.hasClass({ rowIndx: ui.rowIndx, cls: 'pq-row-edit' });
}
},