ListObject::OriginalDataRestored Event
Occurs when a user performs an action that is not allowed, and the ListObject control then reverts back to its original state.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
An example of an action that would cause this event to be raised is if a user makes changes to data that is read-only. The ListObject control undoes the changes and replaces the original values.
This event provides information in an enumeration that contains what was restored and why.
The following code example creates a DataTable and a ListObject, and binds the ListObject to the DataTable. It then creates an OriginalDataRestored event handler. To test the event, right-click a column letter above the ListObject on sheet 1 and then click Delete in the shortcut menu. The event handler replaces the column and column header data and displays a message for each action.
This version is for a document-level customization.
This version is for an application-level add-in. To use this code example, add the using System.Data; directive if you are using C# or the Imports System.Data statement if you are using Visual Basic.