Skip to main content
A newer version of this page is available. .

SpreadsheetControl Events

Emulates the Microsoft® Excel® look and feel and allows you to create, load, edit, save and print spreadsheet documents.
Name Description
ActiveSheetChanged Occurs after an active worksheet in a workbook has been changed.
ActiveSheetChanging Occurs when an active worksheet in a workbook is about to be changed.
AfterDropRange Occurs after a user dropped the selected cell range in a new location.
AfterFillRange Occurs after a cell range was automatically filled with data based on values in the source range.
BeforeDispose Occurs before the SpreadsheetControl control is released from memory.
BeforeDragRange Occurs when a user starts to drag the selected cell range.
BeforeDropRange Occurs when a user is about to drop the selected cell range in a new location.
BeforeExport Occurs before the document is saved (exported to a certain format).
BeforeFillRange Occurs when a user drags the fill handle to populate cells with data based on values in the source range.
BeforeImport Occurs before a document is loaded (imported from an external source).
BeforePrintSheet Provides the capability to prevent printing of the required worksheets in a workbook.
CellBeginEdit Occurs before a cell editor is opened.
CellCancelEdit Occurs before the cell editor is closed and the entered value is rolled back.
CellEndEdit Occurs before a cell editor is closed.
CellValueChanged Occurs after a cell value has been changed.
ClipboardDataObtained Occurs after data on the clipboard is obtained and recognized, but before data is pasted.
ClipboardDataPasted Occurs after data was pasted from the clipboard onto a worksheet.
ClipboardDataPasting Occurs before data is pasted into destination cells.
ColumnsInserted Occurs after new columns have been inserted into a worksheet.
ColumnsInserting Occurs when new columns are about to be inserted into a worksheet.
ColumnsRemoved Occurs after columns have been deleted from a worksheet.
ColumnsRemoving Occurs when columns are about to be deleted from a worksheet.
CommentInserted Occurs when a comment is inserted.
CommentInserting Occurs before inserting a comment.
CommentRemoved Occurs when a comment is deleted.
CommentRemoving Occurs before deleting a comment.
ContentChanged Occurs when the document content was changed.
ContextMenuClosing Occurs just before any context menu on the element is closed. Inherited from FrameworkElement.
ContextMenuOpening Occurs when any context menu on the element is opened. Inherited from FrameworkElement.
CopiedRangePasted Occurs after the range content has been pasted into target cells.
CopiedRangePasting Occurs before the range content is pasted into target cells.
CustomAssemblyLoading Occurs before a custom assembly is loaded for use as the Entity Framework data source and allows canceling loading.
CustomCellEdit Allows you to assign a custom in-place editor to a cell.
DataBindingWarning Occurs before a data binding warning dialog is shown in the SpreadsheetControl.
DataContextChanged Occurs when the data context for this element changes. Inherited from FrameworkElement.
DefinedNameConflictResolving Occurs when a formula or sheet being moved or copied contains a defined name which already exists on the destination worksheet or workbook.
DefinedNameDeleting Occurs before a Defined Name is deleted.
DefinedNameEditing Occurs before a Defined Name is being edited.
DefinedNameValidating Occurs when a new Defined Name is created before it is added to a collection.
DocumentClosing Occurs when a document that has not yet been saved is about to be closed.
DocumentLoaded Occurs after a document is loaded into the Spreadsheet control.
DocumentPropertiesChanged Occurs after one of the DocumentProperties is changed.
DocumentSaved Occurs after a document has been saved.
DragEnter Occurs when the input system reports an underlying drag event with this element as the drag target. Inherited from UIElement.
DragLeave Occurs when the input system reports an underlying drag event with this element as the drag origin. Inherited from UIElement.
DragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target. Inherited from UIElement.
Drop Occurs when the input system reports an underlying drop event with this element as the drop target. Inherited from UIElement.
EmptyDocumentCreated Occurs when a new document is created in the Spreadsheet control.
EncryptedFileIntegrityCheckFailed Occurs when the encrypted file did not pass the data integrity verification.
EncryptedFilePasswordCheckFailed Occurs when the encryption password is empty or invalid.
EncryptedFilePasswordRequest Occurs when the WorkbookImportOptions.Password property is not set or contains a wrong password.
FocusableChanged Occurs when the value of the Focusable property changes. Inherited from UIElement.
GiveFeedback Occurs when the input system reports an underlying drag-and-drop event that involves this element. Inherited from UIElement.
GotFocus Occurs when this element gets logical focus. Inherited from UIElement.
GotKeyboardFocus Occurs when the keyboard is focused on this element. Inherited from UIElement.
GotMouseCapture Occurs when this element captures the mouse. Inherited from UIElement.
GotStylusCapture Occurs when this element captures the stylus. Inherited from UIElement.
GotTouchCapture Occurs when a touch is captured to this element. Inherited from UIElement.
HyperlinkClick Occurs when an end-user clicks the hyperlink to activate it.
Initialized Occurs when this FrameworkElement is initialized. This event coincides with cases where the value of the IsInitialized property changes from false (or undefined) to true. Inherited from FrameworkElement.
InitializeDocument Occurs before a document is loaded. Handle this event to set initial document settings.
InvalidFormatException Fires when the supplied data could not be recognized as data in the assumed format for import.
IsEnabledChanged Occurs when the value of the IsEnabled property on this element changes. Inherited from UIElement.
IsHitTestVisibleChanged Occurs when the value of the IsHitTestVisible dependency property changes on this element. Inherited from UIElement.
IsKeyboardFocusedChanged Occurs when the value of the IsKeyboardFocused property changes on this element. Inherited from UIElement.
IsKeyboardFocusWithinChanged Occurs when the value of the IsKeyboardFocusWithin property changes on this element. Inherited from UIElement.
IsMouseCapturedChanged Occurs when the value of the IsMouseCaptured property changes on this element. Inherited from UIElement.
IsMouseCaptureWithinChanged Occurs when the value of the IsMouseCaptureWithinProperty changes on this element. Inherited from UIElement.
IsMouseDirectlyOverChanged Occurs when the value of the IsMouseDirectlyOver property changes on this element. Inherited from UIElement.
IsStylusCapturedChanged Occurs when the value of the IsStylusCaptured property changes on this element. Inherited from UIElement.
IsStylusCaptureWithinChanged Occurs when the value of the IsStylusCaptureWithin property changes on this element. Inherited from UIElement.
IsStylusDirectlyOverChanged Occurs when the value of the IsStylusDirectlyOver property changes on this element. Inherited from UIElement.
IsVisibleChanged Occurs when the value of the IsVisible property changes on this element. Inherited from UIElement.
KeyDown Occurs when a key is pressed while focus is on this element. Inherited from UIElement.
KeyUp Occurs when a key is released while focus is on this element. Inherited from UIElement.
LayoutUpdated Occurs when the layout of the various visual elements associated with the current Dispatcher changes. Inherited from UIElement.
Loaded Occurs when the element is laid out, rendered, and ready for interaction. Inherited from FrameworkElement.
LostFocus Occurs when this element loses logical focus. Inherited from UIElement.
LostKeyboardFocus Occurs when the keyboard is no longer focused on this element. Inherited from UIElement.
LostMouseCapture Occurs when this element loses mouse capture. Inherited from UIElement.
LostStylusCapture Occurs when this element loses stylus capture. Inherited from UIElement.
LostTouchCapture Occurs when this element loses a touch capture. Inherited from UIElement.
ManipulationBoundaryFeedback Occurs when the manipulation encounters a boundary. Inherited from UIElement.
ManipulationCompleted Occurs when a manipulation and inertia on the UIElement object is complete. Inherited from UIElement.
ManipulationDelta Occurs when the input device changes position during a manipulation. Inherited from UIElement.
ManipulationInertiaStarting Occurs when the input device loses contact with the UIElement object during a manipulation and inertia begins. Inherited from UIElement.
ManipulationStarted Occurs when an input device begins a manipulation on the UIElement object. Inherited from UIElement.
ManipulationStarting Occurs when the manipulation processor is first created. Inherited from UIElement.
ModifiedChanged Occurs when the value of the SpreadsheetControl.Modified property is changed.
MouseDoubleClick Occurs when a mouse button is clicked two or more times. Inherited from Control.
MouseDown Occurs when any mouse button is pressed while the pointer is over this element. Inherited from UIElement.
MouseEnter Occurs when the mouse pointer enters the bounds of this element. Inherited from UIElement.
MouseLeave Occurs when the mouse pointer leaves the bounds of this element. Inherited from UIElement.
MouseLeftButtonDown Occurs when the left mouse button is pressed while the mouse pointer is over this element. Inherited from UIElement.
MouseLeftButtonUp Occurs when the left mouse button is released while the mouse pointer is over this element. Inherited from UIElement.
MouseMove Occurs when the mouse pointer moves while over this element. Inherited from UIElement.
MouseRightButtonDown Occurs when the right mouse button is pressed while the mouse pointer is over this element. Inherited from UIElement.
MouseRightButtonUp Occurs when the right mouse button is released while the mouse pointer is over this element. Inherited from UIElement.
MouseUp Occurs when any mouse button is released over this element. Inherited from UIElement.
MouseWheel Occurs when the user rotates the mouse wheel while the mouse pointer is over this element. Inherited from UIElement.
PanesFrozen Occurs when freezing a worksheet area via the control’s UI.
PanesUnfrozen Occurs when unfreezing a locked (frozen) worksheet area via the SpreadsheetControl UI.
PopupMenuShowing Occurs before a popup menu is created for the control’s document whenever a context menu is being invoked.
PreviewDragEnter Occurs when the input system reports an underlying drag event with this element as the drag target. Inherited from UIElement.
PreviewDragLeave Occurs when the input system reports an underlying drag event with this element as the drag origin. Inherited from UIElement.
PreviewDragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target. Inherited from UIElement.
PreviewDrop Occurs when the input system reports an underlying drop event with this element as the drop target. Inherited from UIElement.
PreviewGiveFeedback Occurs when a drag-and-drop operation is started. Inherited from UIElement.
PreviewGotKeyboardFocus Occurs when the keyboard is focused on this element. Inherited from UIElement.
PreviewKeyDown Occurs when a key is pressed while focus is on this element. Inherited from UIElement.
PreviewKeyUp Occurs when a key is released while focus is on this element. Inherited from UIElement.
PreviewLostKeyboardFocus Occurs when the keyboard is no longer focused on this element. Inherited from UIElement.
PreviewMouseDoubleClick Occurs when a user clicks the mouse button two or more times. Inherited from Control.
PreviewMouseDown Occurs when any mouse button is pressed while the pointer is over this element. Inherited from UIElement.
PreviewMouseLeftButtonDown Occurs when the left mouse button is pressed while the mouse pointer is over this element. Inherited from UIElement.
PreviewMouseLeftButtonUp Occurs when the left mouse button is released while the mouse pointer is over this element. Inherited from UIElement.
PreviewMouseMove Occurs when the mouse pointer moves while the mouse pointer is over this element. Inherited from UIElement.
PreviewMouseRightButtonDown Occurs when the right mouse button is pressed while the mouse pointer is over this element. Inherited from UIElement.
PreviewMouseRightButtonUp Occurs when the right mouse button is released while the mouse pointer is over this element. Inherited from UIElement.
PreviewMouseUp Occurs when any mouse button is released while the mouse pointer is over this element. Inherited from UIElement.
PreviewMouseWheel Occurs when the user rotates the mouse wheel while the mouse pointer is over this element. Inherited from UIElement.
PreviewQueryContinueDrag Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation. Inherited from UIElement.
PreviewStylusButtonDown Occurs when the stylus button is pressed while the pointer is over this element. Inherited from UIElement.
PreviewStylusButtonUp Occurs when the stylus button is released while the pointer is over this element. Inherited from UIElement.
PreviewStylusDown Occurs when the stylus touches the digitizer while it is over this element. Inherited from UIElement.
PreviewStylusInAirMove Occurs when the stylus moves over an element without actually touching the digitizer. Inherited from UIElement.
PreviewStylusInRange Occurs when the stylus is close enough to the digitizer to be detected, while over this element. Inherited from UIElement.
PreviewStylusMove Occurs when the stylus moves while over the element. The stylus must move while being detected by the digitizer to raise this event, otherwise, PreviewStylusInAirMove is raised instead. Inherited from UIElement.
PreviewStylusOutOfRange Occurs when the stylus is too far from the digitizer to be detected. Inherited from UIElement.
PreviewStylusSystemGesture Occurs when a user performs one of several stylus gestures. Inherited from UIElement.
PreviewStylusUp Occurs when the user raises the stylus off the digitizer while the stylus is over this element. Inherited from UIElement.
PreviewTextInput Occurs when this element gets text in a device-independent manner. Inherited from UIElement.
PreviewTouchDown Occurs when a finger touches the screen while the finger is over this element. Inherited from UIElement.
PreviewTouchMove Occurs when a finger moves on the screen while the finger is over this element. Inherited from UIElement.
PreviewTouchUp Occurs when a finger is raised off of the screen while the finger is over this element. Inherited from UIElement.
PropertyChanged Occurs every time any of the SpreadsheetControl class properties has changed its value.
ProtectionWarning Occurs when attempting to edit a locked cell in a protected worksheet.
QueryContinueDrag Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation. Inherited from UIElement.
QueryCursor Occurs when the cursor is requested to display. This event is raised on an element each time that the mouse pointer moves to a new location, which means the cursor object might need to be changed based on its new position. Inherited from UIElement.
RangeCopied Occurs after the range content has been copied.
RangeCopying Occurs before a cell range is copied in a worksheet.
ReadOnlyChanged Occurs when the read-only state of the SpreadsheetControl control is changed.
RequestBringIntoView Occurs when BringIntoView(Rect) is called on this element. Inherited from FrameworkElement.
RowsInserted Occurs after new rows have been added to a worksheet.
RowsInserting Occurs when new rows are about to be inserted into a worksheet.
RowsRemoved Occurs after rows have been deleted from a worksheet.
RowsRemoving Occurs when rows are about to be deleted from a worksheet.
ScrollPositionChanged Occurs when a worksheet is being scrolled in the SpreadsheetControl‘s UI.
SelectionChanged Fires when the selection changes in an active worksheet.
ShapeInserted Occurs after a drawing object has been inserted into a worksheet.
ShapeRemoved Occurs after a drawing object has been removed from a worksheet.
ShapeRemoving Occurs before a drawing object is removed from a worksheet.
ShapesCopying Occurs before a drawing object is copied in a worksheet.
SheetInserted Occurs after a new worksheet has been added to a workbook.
SheetRemoved Occurs after a worksheet has been removed from a workbook.
SheetRemoving Occurs when a worksheet is about to be removed from a workbook.
SheetRenamed Occurs after a worksheet has been renamed.
SheetRenaming Occurs when a worksheet is about to be renamed.
SizeChanged Occurs when either the ActualHeight or the ActualWidth properties change value on this element. Inherited from FrameworkElement.
SourceUpdated Occurs when the source value changes for any existing property binding on this element. Inherited from FrameworkElement.
StylusButtonDown Occurs when the stylus button is pressed while the pointer is over this element. Inherited from UIElement.
StylusButtonUp Occurs when the stylus button is released while the pointer is over this element. Inherited from UIElement.
StylusDown Occurs when the stylus touches the digitizer while the stylus is over this element. Inherited from UIElement.
StylusEnter Occurs when the stylus enters the bounds of this element. Inherited from UIElement.
StylusInAirMove Occurs when the stylus moves over an element without actually touching the digitizer. Inherited from UIElement.
StylusInRange Occurs when the stylus is close enough to the digitizer to be detected, while over this element. Inherited from UIElement.
StylusLeave Occurs when the stylus leaves the bounds of the element. Inherited from UIElement.
StylusMove Occurs when the stylus moves over this element. The stylus must move while on the digitizer to raise this event. Otherwise, StylusInAirMove is raised instead. Inherited from UIElement.
StylusOutOfRange Occurs when the stylus is too far from the digitizer to be detected, while over this element. Inherited from UIElement.
StylusSystemGesture Occurs when a user performs one of several stylus gestures. Inherited from UIElement.
StylusUp Occurs when the user raises the stylus off the digitizer while it is over this element. Inherited from UIElement.
TargetUpdated Occurs when the target value changes for any property binding on this element. Inherited from FrameworkElement.
TextInput Occurs when this element gets text in a device-independent manner. Inherited from UIElement.
ToolTipClosing Occurs just before any tooltip on the element is closed. Inherited from FrameworkElement.
ToolTipOpening Occurs when any tooltip on the element is opened. Inherited from FrameworkElement.
TouchDown Occurs when a finger touches the screen while the finger is over this element. Inherited from UIElement.
TouchEnter Occurs when a touch moves from outside to inside the bounds of this element. Inherited from UIElement.
TouchLeave Occurs when a touch moves from inside to outside the bounds of this element. Inherited from UIElement.
TouchMove Occurs when a finger moves on the screen while the finger is over this element. Inherited from UIElement.
TouchUp Occurs when a finger is raised off of the screen while the finger is over this element. Inherited from UIElement.
UnhandledException This event is raised when an exception unhandled by the SpreadsheetControl occurs.
UnitChanged Fires after the SpreadsheetControl.Unit property is changed.
UnitChanging Fires before the SpreadsheetControl.Unit property is changed.
Unloaded Occurs when the element is removed from within an element tree of loaded elements. Inherited from FrameworkElement.
UpdateUI Raised when changes occur which may affect the control’s UI.
VisibleRangeChanged
ZoomChanged Occurs when the current zoom level has been changed.
See Also