V4 V5

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

MemberWhat it does
WorkbookThe workbook it holds
ActiveWorksheetThe 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 / ActiveSheetChangedEvents

new ReoGridControl() starts out holding a single Sheet1.

Selection

MemberWhat it does
Selection / ActiveCellThe selected range and the active cell
MoveTo(row, col)Moves
SelectionChangedEvent

Bulk operations on the selection are collected in Selection and the Active Cell.

Editing

MemberWhat it does
BeginEdit(initialText) / CancelEdit() / IsEditingStarting and cancelling an edit
GetActiveCellInput() / SetActiveCellInput(text)Input and output for a formula bar
ToggleEditingBold() and friendsFormatting while editing

History

Undo() / Redo() / CanUndo / CanRedo / HistoryChanged. Ctrl+Z and Ctrl+Y are wired up.

Display

MemberWhat it does
Zoom / ZoomChangedThe zoom factor (Ctrl+wheel works too)
SetFreeze(rows, cols)Freeze panes
ShowGridLines / ShowHeaders / ShowOutlinesDisplay toggles
DpiScaleDeviceDpi / 96

Other events

EventWhen
ContextMenuRequestedA right-click. Build the menu on the host side
CellButtonClickedA 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

MemberWhat 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.

Was this article helpful?