Hi Victor
I think the logical flow should be:
1. set your JSProperty (e.g. cpRowSavedOk or whatever you want to name it) to false$ upon new or existing edit starting (client side)
2. Following successful delete/insert/update set this JSproperty to true (server side e.g. through relevant datasource event)
3. on EndCallBack (clientside) - check if your JSProperty = true before doing whatever else you are attempting?
Best of luck