Hi,
I have an issue when creating new items in a grid. When I create new item in a grid and after response from server I call
grid.commit({ type: 'add', rows: changes.addList });
I am getting java script error
jsnlog.js:648 window.onerror logger: {"stack":"TypeError: Cannot read property 'dataIndx' of undefined\n at l.saveCell (
http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:9:30945)\n at t.(anonymous function).(anonymous function).l._digestUpdate (
http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:10:22122)\n at t.(anonymous function).(anonymous function).l._digestData (
http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:10:21735)\n at e.cUCData.commit (
http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:13:13131)\n at t.(anonymous function).(anonymous function).n.commit (
http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:13:19130)\n at Object.onSuccess (
http://localhost:51125/App/services/custombindings.js:1105:38)\n at AnonymousObserver._onNext (
http://localhost:51125/App/components/limitIntervalsEdit/limitIntervalsEdit.js:167:28)\n at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (
http://localhost:51125/Scripts/lib/RxJS/rx.all.js:1828:18)\n at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (
http://localhost:51125/Scripts/lib/RxJS/rx.all.js:1762:37)\n at AnonymousObserver.tryCatcher (
http://localhost:51125/Scripts/lib/RxJS/rx.all.js:63:39)","message":"Cannot read property 'dataIndx' of undefined","name":"TypeError","logData":"window.onerror Error: Uncaught TypeError: Cannot read property 'dataIndx' of undefined\nurl:
http://localhost:51125/Scripts/lib/RxJS/rx.all.js\nline #: 77"} : (
http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:10:21735)
what is a structure of rows in commit method?
Server side is creating new items and set ids. I set new ids to grid.getChanges().addList and try to use this in commit
In case I do not add anything and call
grid.commit({ type: 'add', rows: changes.addList });
grid.commit({ type: 'update', rows: changes.updateList });
grid.commit({ type: 'delete', rows: changes.deleteList });
everything seems fine (red triangles are gone) or even commit without any parameter
grid.commit();
looks fine, but then ids for newly created items remain empty and after another Accept Changes server side re create them again.
Best Regards