Skip to main content

SpreadsheetControl Events

Emulates the Microsoft® Excel® appearance and allows you to create, load, edit, save and print spreadsheet documents.
Name Description
ActiveSheetChanged Occurs after an active worksheet has been changed via the SpreadsheetControl‘s UI.
ActiveSheetChanging Occurs when an active worksheet is about to be changed via the SpreadsheetControl‘s UI.
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.
AfterGroupProcessing Fires after the expand/collapse operation is executed for row or column groups in a worksheet.
AfterOutlineButtonClick Fires after a user clicks an outline button for row or column groups.
AutoSizeChanged This event is not relevant for this class. Inherited from Control.
BackColorChanged Occurs when the value of the BackColor property changes. Inherited from Control.
BackgroundImageChanged Occurs when the value of the BackgroundImage property changes. Inherited from Control.
BackgroundImageLayoutChanged Occurs when the BackgroundImageLayout property changes. Inherited from Control.
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.
BeforeEncodingDetection Occurs before detecting the encoding of the loaded CSV or TXT data.
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.
BeforeGroupProcessing Fires before the expand/collapse operation is executed for row or column groups in a worksheet.
BeforeImport Occurs before a document is loaded (imported from an external source).
BeforeOutlineButtonClick Fires before a user clicks an outline button for row or column groups.
BeforePrintSheet Provides the capability to prevent printing of the required worksheets in a workbook.
BindingContextChanged Occurs when the value of the BindingContext property changes. Inherited from Control.
CausesValidationChanged Occurs when the value of the CausesValidation property changes. Inherited from Control.
CellBeginEdit Occurs before a cell editor is opened.
CellCancelEdit Occurs before the cell editor is closed and the entered value is rolled back.
CellEditorOpened Occurs after a cell editor was activated by a user.
CellEndEdit Occurs before a cell editor is closed and the entered value is committed.
CellValueChanged Occurs after the cell content was changed via the SpreadsheetControl UI.
ChangeUICues Occurs when the focus or keyboard user interface (UI) cues change. Inherited from Control.
Click Occurs when the control is clicked. Inherited from Control.
ClientSizeChanged Occurs when the value of the ClientSize property changes. Inherited from Control.
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 added to a worksheet via the SpreadsheetControl‘s UI.
ColumnsInserting Occurs when new columns are about to be inserted into a worksheet.
ColumnsRemoved Occurs after columns have been deleted from a worksheet via the SpreadsheetControl‘s UI.
ColumnsRemoving Occurs when columns are about to be deleted from a worksheet.
ColumnWidthChanged Occurs after the column width was changed.
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 is changed.
ContextMenuChanged Occurs when the value of the ContextMenu property changes. Inherited from Control.
ContextMenuStripChanged Occurs when the value of the ContextMenuStrip property changes. Inherited from Control.
ControlAdded Occurs when a new control is added to the Control.ControlCollection. Inherited from Control.
ControlRemoved Occurs when a control is removed from the Control.ControlCollection. Inherited from Control.
CopiedRangePasted Occurs after the range content has been pasted into target cells.
CopiedRangePasting Occurs before the range content is pasted into target cells.
CursorChanged Occurs when the value of the Cursor property changes. Inherited from Control.
CustomAssemblyLoading Occurs before a custom assembly is loaded for use as the Entity Framework data source during mail merge and allows you to cancel the operation.
CustomCellEdit Allows you to assign a custom in-place editor to a cell.
CustomDrawCell Allows you to paint cell content.
CustomDrawCellBackground Performs custom painting of the cell background.
CustomDrawColumnHeader Enables the column header to be painted manually.
CustomDrawColumnHeaderBackground Enables the column header background to be painted manually.
CustomDrawCommentIndicator Allows you to customize comment indicators.
CustomDrawFrozenPaneBorder Enables frozen pane borders to be painted manually.
CustomDrawRowHeader Enables the row header to be painted manually.
CustomDrawRowHeaderBackground Enables the row header background to be painted manually.
DataBindingWarning Occurs before a data binding warning dialog is shown in the SpreadsheetControl.
DefinedNameAdded Occurs after the defined name is created.
DefinedNameConflictResolving Occurs when a formula or sheet being moved or copied contains a defined name that already exists in the destination worksheet or workbook.
DefinedNameDeleted Occurs after the defined name is deleted.
DefinedNameDeleting Occurs before a Defined Name is deleted.
DefinedNameEdited Occurs after the defined name parameters were changed.
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.
Disposed Occurs when the component is disposed by a call to the Dispose() method. Inherited from Component.
DockChanged Occurs when the value of the Dock property changes. Inherited from Control.
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.
DoubleClick Occurs when the control is double-clicked. Inherited from Control.
DragDrop Occurs when a drag-and-drop operation is completed. Inherited from Control.
DragEnter Occurs when an object is dragged into the control’s bounds. Inherited from Control.
DragLeave Occurs when an object is dragged out of the control’s bounds. Inherited from Control.
DragOver Occurs when an object is dragged over the control’s bounds. Inherited from Control.
EmptyDocumentCreated Occurs when a new document is created in the SpreadsheetControl.
EnabledChanged Occurs when the Enabled property value has changed. Inherited from Control.
EncryptedFileIntegrityCheckFailed Occurs when the encrypted file does not pass 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 the wrong password.
Enter Occurs when the control is entered. Inherited from Control.
FontChanged Occurs when the Font property value changes. Inherited from Control.
ForeColorChanged Occurs when the ForeColor property value changes. Inherited from Control.
GiveFeedback Occurs during a drag operation. Inherited from Control.
GotFocus Occurs when the control receives focus. Inherited from Control.
GroupStateChanged Fires after row or column groups are expanded or collapsed.
GroupStateChanging Fires before row or column groups are expanded or collapsed.
HandleCreated Occurs when a handle is created for the control. Inherited from Control.
HandleDestroyed Occurs when the control’s handle is in the process of being destroyed. Inherited from Control.
HelpRequested Occurs when the user requests help for a control. Inherited from Control.
HyperlinkClick Occurs when an end-user activates the hyperlink before navigating to the referenced location.
ImeModeChanged Occurs when the ImeMode property has changed. Inherited from Control.
InitializeDocument Occurs before a document is loaded. Handle this event to set the initial document settings.
Invalidated Occurs when a control’s display requires redrawing. Inherited from Control.
InvalidFormatException Fires when the supplied data could not be recognized as data in the assumed format for import.
KeyDown Occurs when a key is pressed while the control has focus. Inherited from Control.
KeyPress Occurs when a character. space or backspace key is pressed while the control has focus. Inherited from Control.
KeyUp Occurs when a key is released while the control has focus. Inherited from Control.
Layout Occurs when a control should reposition its child controls. Inherited from Control.
Leave Occurs when the input focus leaves the control. Inherited from Control.
LocationChanged Occurs when the Location property value has changed. Inherited from Control.
LostFocus Occurs when the control loses focus. Inherited from Control.
MarginChanged Occurs when the control’s margin changes. Inherited from Control.
ModifiedChanged Occurs when the value of the SpreadsheetControl.Modified property is changed.
MouseCaptureChanged Occurs when the control loses mouse capture. Inherited from Control.
MouseClick Occurs when the control is clicked by the mouse. Inherited from Control.
MouseDoubleClick Occurs when the control is double clicked by the mouse. Inherited from Control.
MouseDown Occurs when the mouse pointer is over the control and a mouse button is pressed. Inherited from Control.
MouseEnter Occurs when the mouse pointer enters the control. Inherited from Control.
MouseHover Occurs when the mouse pointer rests on the control. Inherited from Control.
MouseLeave Occurs when the mouse pointer leaves the control. Inherited from Control.
MouseMove Occurs when the mouse pointer is moved over the control. Inherited from Control.
MouseUp Occurs when the mouse pointer is over the control and a mouse button is released. Inherited from Control.
MouseWheel Occurs when the mouse wheel moves while the control has focus. Inherited from Control.
Move Occurs when the control is moved. Inherited from Control.
PaddingChanged Occurs when the control’s padding changes. Inherited from Control.
Paint Occurs when the control is redrawn. Inherited from Control.
PanesFrozen Occurs after a worksheet area has been frozen via the SpreadsheetControl‘s UI.
PanesUnfrozen Occurs after a frozen worksheet area has been unlocked via the SpreadsheetControl‘s UI.
ParentChanged Occurs when the Parent property value changes. Inherited from Control.
PopupMenuShowing Occurs when a popup menu is about to be displayed for the SpreadsheetControl‘s visual elements.
PreviewKeyDown Occurs before the KeyDown event when a key is pressed while focus is on this control. Inherited from Control.
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.
QueryAccessibilityHelp Occurs when AccessibleObject is providing help to accessibility applications. Inherited from Control.
QueryContinueDrag Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled. Inherited from Control.
RangeCopied Occurs after the range content has been copied.
RangeCopying Occurs before a cell range is copied in a worksheet.
ReadOnlyChanged Occurs when the SpreadsheetControl‘s read-only state is changed.
RegionChanged Occurs when the value of the Region property changes. Inherited from Control.
Resize Occurs when the control is resized. Inherited from Control.
RightToLeftChanged Occurs when the RightToLeft property value changes. Inherited from Control.
RowHeightChanged Occurs after the row height was changed.
RowsInserted Occurs after new rows have been added to a worksheet via the SpreadsheetControl‘s UI.
RowsInserting Occurs when new rows are about to be inserted into a worksheet.
RowsRemoved Occurs after rows have been deleted from a worksheet via the SpreadsheetControl‘s UI.
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.
SheetInserted Occurs after a new worksheet has been added into a workbook via the SpreadsheetControl‘s UI.
SheetRemoved Occurs after a worksheet has been removed from a workbook via the SpreadsheetControl‘s UI.
SheetRemoving Occurs when a worksheet is about to be removed from a workbook.
SheetRenamed Occurs after a worksheet has been renamed via the SpreadsheetControl‘s UI.
SheetRenaming Occurs when a worksheet is about to be renamed via the SpreadsheetControl‘s UI.
SizeChanged Occurs when the Size property value changes. Inherited from Control.
StyleChanged Occurs when the control style changes. Inherited from Control.
SystemColorsChanged Occurs when the system colors change. Inherited from Control.
TabIndexChanged Occurs when the TabIndex property value changes. Inherited from Control.
TabStopChanged Occurs when the TabStop property value changes. Inherited from Control.
TextChanged Occurs when the Text property value changes. Inherited from Control.
UnhandledException This event is raised when an exception, unhandled by the SpreadsheetControl, occurs.
UnitChanged Fires after a unit of measurement used in the workbook is changed.
UnitChanging Fires before a unit of measurement used within the workbook is changed.
UpdateUI Raised when changes occur which may affect the control’s UI.
ValidateCustomSqlQuery Allows validation of the custom SQL query created using the Data Source Wizard.
Validated Occurs when the control is finished validating. Inherited from Control.
Validating Occurs when the control is validating. Inherited from Control.
VisibleChanged Occurs when the Visible property value changes. Inherited from Control.
VisibleRangeChanged Occurs after the visible cell range was changed in the Spreadsheet control.
ZoomChanged Occurs when the current zoom level of the active worksheet has been changed via the SpreadsheetControl‘s UI.
See Also