The package is unvell.ReoGrid.One and the namespace is unvell.ReoGrid.WinForms.
Drawing goes through GDI+ (GdiGraphics).
For getting started and sample code, see WinForms Quick Start. This page is the member list.
Workbook
| Member | What it does |
|---|---|
Workbook | The workbook it holds |
ActiveWorksheet | The sheet being displayed |
SetWorksheet(ws) | Switches which sheet is displayed |
LoadWorkbook(wb) | Replaces the whole workbook |
NewWorkbook() | A new one (with a single Sheet1) |
LoadJson(json) | Loads from reogrid-json |
WorkbookChanged / ActiveSheetChanged | Events |
new ReoGridControl() starts out holding a single Sheet1.
Selection
| Member | What it does |
|---|---|
Selection / ActiveCell | The selected range and the active cell |
MoveTo(row, col) | Moves |
SelectionChanged | Event |
Bulk operations on the selection are collected in Selection and the Active Cell.
Editing
| Member | What it does |
|---|---|
BeginEdit(initialText) / CancelEdit() / IsEditing | Starting and cancelling an edit |
GetActiveCellInput() / SetActiveCellInput(text) | Input and output for a formula bar |
ToggleEditingBold() and friends | Formatting while editing |
History
Undo() / Redo() / CanUndo / CanRedo / HistoryChanged.
Ctrl+Z and Ctrl+Y are wired up.
Display
| Member | What it does |
|---|---|
Zoom / ZoomChanged | The zoom factor (Ctrl+wheel works too) |
SetFreeze(rows, cols) | Freeze panes |
ShowGridLines / ShowHeaders / ShowOutlines | Display toggles |
DpiScale | DeviceDpi / 96 |
Other events
| Event | When |
|---|---|
ContextMenuRequested | A right-click. Build the menu on the host side |
CellButtonClicked | A button cell type was clicked |
There is no built-in context menu — handle ContextMenuRequested and build your own
(ReoGrid.Studio is the reference implementation). See Events.
High DPI
Enabling PerMonitorV2 is recommended.
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
Windows then hands the control a physical-pixel client area instead of scaling a bitmap, and the control scales its own drawing for a crisp result.
Rendering to an arbitrary Graphics
| Member | What it does |
|---|---|
RenderTo(graphics, width, height, scale) | Renders at a logical size you give |
RenderFrame(graphics, physicalWidth, physicalHeight) | Physical pixels (zoom included) |
Useful for generating thumbnails or writing images headlessly.
Printing
using var doc = control.CreatePrintDocument();
doc.Print();
It returns a PrintDocument, so you can hand it straight to the standard print dialog or a
print preview. See Printing and Page Setup.