Grid OnSave event (Client API reference)
The OnSave
event occurs before sending the updated information to the server, and when any of the following occurs:
- There is a change in the record selection.
- The user explicitly triggers a save operation using the editable grid's save button.
- The user applies a sort, filter, group, pagination, or navigation operation from the editable grid while there are pending changes.
Some important points to consider for the OnSave
event:
- If a user edits multiple columns of the same record in sequence, the OnSave event will only be fired once to ensure optimal performance and form behavior compatibility.
- Editable grid and the parent form have separate save buttons. Selecting the save button in one will not save changes in the other.
- Editable grid does not save pending changes when navigation operations are performed outside of its context. If the control has unsaved data, that data may be lost. Consequently, the
OnSave
event may not fire. For example, this could happen when navigating to a different record using a form lookup column or through the ribbon. - Selecting the refresh button in the editable grid causes it to discard any pending changes, and the
OnSave
event won't be fired. - Editable grid control does not implement an auto-save timer. Editable grid suppresses duplicate detection rules.
Note
The OnSave
event for appointment, recurring appointment, or service activity records will cancel the save operation and use the Book
message to persist the change rather than Create
or Update
. Because of this, OnSave
and PostSave
event handlers for these tables will not work.
Related article
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for