Cell Events

Event When
BeforeCellEdit Before any cells to be changed to edit mode
AfterCellEdit When any cells have been edited by user
CellDataChanged When data of cell have been changed
CellMouseEnter When mouse moved into a cell, the cell will be hovered
CellMouseLeave When mouse leaved from a hovered cell
CellMouseDown When mouse button pressed inside a cell
CellMouseUp When mouse button released inside a cell
CellMouseMove When mouse moving inside a cell

Rows and Columns Events

Event When
RowInserted When user inserted rows
RowDeleted When user deleted rows
ColInserted When user inserted columns
ColDeleted When user deleted columns

Range Events

Event When
RangeMerged When range merged
RangeUnmerged When range unmerged
RangeStyleChanged When styles have been set

Border Events

Event When
BorderAdded When borders have been set
BorderRemoved When borders have been removed

Selection Events

Event When
SelectionRangeChanged When selection range changed
SelectionRangeChanging Fired during selection changing by mouse (available in 0.8.6)
SelectionModeChanged When selection mode changed
SelectionStyleChanged When selection style changed
SelectionForwardDirectionChanged When selection forwarding direction changed
SelectionMovedForward When selection will be moved into next position
HoverPosChanged When mouse move over on cells
FocusPosChanged When focused cell changed

Outline Events

Event When
OutlineAdded When an outline has been added onto the spreadsheet
OutlineRemoved When an outline has been removed from the spreadsheet
BeforeOutlineCollapse When user clicked on the - button of an outline to collapse it
AfterOutlineCollapse When an outline has been collapsed
BeforeOutlineExpand When user clicked on the + button of an outline to expand it
AfterOutlineExpand When an outline has been expanded

For usage of outline events, see Group & Outline.

Action Events

Event When
ActionPerformed When any actions have been performed
Undid When undid action
Redid When redid action

Control Events

Event When
GridScaled When control scaled (zoom in/out)
FileLoaded When content of control loaded from a file stream (load from given stream will not fire this event)
FileSaved When content of control have been saved into file stream (save into given stream will not fire this event)
Resetted When control has been reset to default status
CellsFrozen When grid has been frozen to any cells
CellsUnfreeze When frozen has been removed

Clipboard Events

Event When
BeforeCopy Before doing copy operation
AfterCopy When range copied from Clipboard
BeforePaste Before doing paste operation
AfterPaste When range pasted from Clipboard
BeforeCut Before doing cut operation
AfterCut When range cut by user
OnPasteError When errors happened during paste operation

Set editable range by handling event

Many before-event provided by ReoGrid have the property IsCancelled, which can be set as true to notify Control to cancel the following operations. It typically to be used to prevent the cell-edit or outline-collapse/expand operations.

For example, to only allow the text editing inside specified range:
var editableRange = new ReoGridRange(3,1,2,3);

grid.SetRangeBorder(editableRange, ReoGridBorderPos.Outline, ReoGridBorderStyle.SolidBlack);

grid[2, 1] = "Edit only be allowed in this range:";
grid.BeforeCellEdit += (s, e) => e.IsCancelled = !editableRange.Contains(e.Cell.GetPos());


Next: Built-in Cell Types

Last edited May 22, 2014 at 11:57 AM by unvell, version 19