I am building a web-app that allows several users to perform read and write-operations on the same table. What is the smartest way of preventing that a record in the table is simultaneously edited by different users (ie. changes from user A get overwritten by user B without any of users noticing the conflicting behaviour)?
I have not tested this scenario before.
I'll let you know after some research on jqgrid available events.
If you can limit with dialog editing, you can use following events of edit dialogs.
afterShowForm and onClose. You can make a custom ajax call in JS function to set lock field of edited row id.
Plus, you need to set "rowactions"=>false to disable inline editing.
Demo usage here: https://gist.github.com/gridphp/a8598a323d7e06ed53a5a897b7c58f64
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!