Getting Started

To install ReoGrid into .NET applications, see installation.

Component Overview


Usually used objects:

Workbook and Worksheet

The control itself is also workbook, a control (workbook) contains multiple worksheets.


Call control (workbook) APIs:

var grid = this.reoGridControl;;

Call worksheet APIs:

var sheet = grid.CurrentWorksheet;;

Access worksheet

Worksheet provides a lot of methods that could be used to manage cells data, styles, borders, outlines, ranges, formula calculation and etc. The below is an example that demos how to set cells data by call worksheet API.

Set cells data using worksheet index property:

// get current active worksheet instance
var sheet = grid.CurrentWorksheet;

// set cells data
sheet["A1"] = "hello world";
sheet[2, 1] = 10;

Or call SetCellData method:

sheet.SetCellData(new CellPosition(2, 1), "hello world");

Learn more about worksheet.

Access by doing actions

Action is undo-framework provided by ReoGrid core, many operations could be done by doing actions. Operations done via actions could be revoke by call Undo method of control. To do operations by using action:

  1. Import this namespace:

using unvell.ReoGrid.Actions;

  1. Call DoAction method of grid control
grid.DoAction(grid.CurrentWorksheet, new xxxxAction(...));

To undo or redo actions:


Repeatedly do last action, apply it to another range:

grid.RepeatLastAction(new RangePosition(2, 3, 5, 5));

The user applications can extend the script functions and objects to provide own customize script features, see Customize Function.

Was the content of the page helpful?