ChangeType Enumeration

 

Provides information about how a ListObject control restored data that was changed by a user.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

public enum class ChangeType

Member nameDescription
ColumnAdded

A column was added to the ListObject control.

ColumnHeaderRestored

The text for the column header was restored to its original value.

ColumnRemoved

A column was removed from the ListObject control.

RangeValueRestored

The values in a range were restored to the values in the data source.

RowAdded

A row was added to the ListObject control.

RowRemoved

A row was removed from the ListObject control.

When the ListObject control is bound to data and the user performs an operation that is not allowed, the ListObject control restores itself to its previous state and raises the OriginalDataRestored event. The ChangeType enumeration provides information about the kind of restoration that occurred.

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.

No code example is currently available or this language may not be supported.
Return to top
Show: