ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: nuno.nogueira on February 07, 2014, 12:55:26 am
-
I'm replicating the demo on "batch editing".
var changes = $grid.pqGrid("getChanges", { format: "byVal" }),
addList = changes.addList,
updateList = changes.updateList,
deleteList = changes.deleteList;
addList and deleteList are both working fine. I'm using exactly the same code as per your demo and I can talk to the server and the database.
But, updateList isn't doing anything. I change one of the cells and click the button "Accept Changes" and the conditional below isn't called, why?
if (updateList.length) {
alert("lista autalizada");}
You may see for yourself an example on http://www.portal-gestao.com/youbudgetz.html (http://www.portal-gestao.com/youbudgetz.html)
-
It's because recIndx (dataIndx of primary key of the records) is missing from your dataModel
-
Ok, I'll include it and hide it from the view, I guess it will still work like that, right?
-
yes you can hide the primary key column.
-
Ok, I've got it working, thanks!
:D
-
Update and delete queries are working, however they never reach the "complete" status. The "loading" gif doesn't go away and the tabe doesn't refresh.
-
I found the answer myself: PHP just has to echo something back in order to make the statys "complete"