This question is locked. New answers and comments are not allowed.
What is the best way to handle an action before going into edit mode or delete an item?
We have a situation that we need to request a lock before doing an edit action. In the OnEdit event I can cancel the edit and do an ajax call to request the lock. When I want to put the row into edit mode again, I can only use the EditRow function, which will trigger the event again.
What I actually need is an OnBeforeEdit function with the ability to cancel the action. The same for the delete functionality.
Is it possible to have these type of events or is there a better way to do it?
I can use custom buttons, but if I have events like OnBeforeEdit I can create much cleaner code.
We have a situation that we need to request a lock before doing an edit action. In the OnEdit event I can cancel the edit and do an ajax call to request the lock. When I want to put the row into edit mode again, I can only use the EditRow function, which will trigger the event again.
What I actually need is an OnBeforeEdit function with the ability to cancel the action. The same for the delete functionality.
Is it possible to have these type of events or is there a better way to do it?
I can use custom buttons, but if I have events like OnBeforeEdit I can create much cleaner code.