The App Upgraded event runs immediately after Share Point has finished everything that it needs to do when the add-in is updated to a new version, but before the user is notified that updating is complete.
Like the App Installed event, it is an after event, but is essentially synchronous and it is a best practice to catch errors and notify Share Point to roll back the update.
with IF-ELSE blocks to implement "already done" logic. But the CSOM does provide a way to bundle try-catch and if-then-else logic and send it to the server for execution.
For a detailed example of a add-in event handler that uses the handler delegation strategy to add a list to a host web, see Create an add-in event receiver in Share Point Add-ins. // Trigger an event when an item is added to the Share Point list.
Share Point-hosted Share Point Add-ins do not support event handling, but you can turn a workflow into a kind of list or list item event handler by setting an event to trigger the workflow. Workflows cannot be triggered by add-in events, so add-in events cannot be handled with a Share Point-hosted add-in.
Edit Index property of Grid View is used to set index of the row to edit and Bind Grid View method is called to bind Grid View with the editing row.
Then Title Id of editing row is retrieved from the Grid View and passed to Bind Details View method to show Author’s detail in the Details View Mode Changing event of Details View control is fires before its mode is changed.
The add-in is not available for use until after your handler has completed, and your handler can cancel the installation (which causes Share Point to roll back everything it has done as part of the installation).
When you install an add-in with Tenant scope, it is installed to the add-in catalog site collection and the App Installed event runs then and only then.