ReoGrid provides a rich event system for responding to user interactions and data changes. Events are available at the workbook, worksheet, and cell levels.
Quick Reference
// Cell data changed
sheet.CellDataChanged += (s, e) =>
Console.WriteLine($"Cell {e.Cell.Address} changed to: {e.Cell.Data}");
// Selection changed
sheet.SelectionChanged += (s, e) =>
Console.WriteLine($"Selected: {sheet.SelectionRange.ToAddress()}");
// Key pressed on a cell
sheet.BeforeCellKeyDown += (s, e) =>
{
if (e.KeyCode == KeyCode.Delete) e.IsCancelled = true;
};
// Mouse click on a cell
sheet.CellMouseDown += (s, e) =>
Console.WriteLine($"Clicked cell: {e.CellPosition}");
In This Section
- Events Reference — Complete listing of all workbook, worksheet, and cell events with event args
- Keyboard Events — Handle key press, key down, and key up events on cells
- Mouse Events — Handle click, hover, enter, leave, and drag events on cells
- Selection Events — Respond to selection range changes and focus cell movement