OriginalDataRestoredEventHandler Delegate
Represents a method that handles the OriginalDataRestored event.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
public delegate void OriginalDataRestoredEventHandler( Object^ sender, OriginalDataRestoredEventArgs^ e )
Parameters
- sender
-
Type:
System::Object^
The source of the event.
- e
-
Type:
Microsoft.Office.Tools.Excel::OriginalDataRestoredEventArgs^
An OriginalDataRestoredEventArgs that contains the event data.
When you create an OriginalDataRestoredEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, until you remove the delegate.
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 indicating what kind of data was restored and the reason that the original data was restored.
This example is for a document-level customization.