Table of Contents

Class NoxGridCellRange

Namespace
Nox.Grid.WinForms
Assembly
Nox.Grid.WinForms.dll

Cell range. grid.Cells[0, 0, 2, 3].BackColor = Color.Yellow, .Merge(), .Value = 0. Rows and columns are by Columns index, inclusive on both ends.

public sealed class NoxGridCellRange
Inheritance
NoxGridCellRange
Inherited Members

Properties

Alignment

Horizontal alignment (Nothing uses the column setting).

public HorizontalAlignment? Alignment { get; set; }

Property Value

HorizontalAlignment?

BackColor

Background color of every cell in the range.

public Color BackColor { get; set; }

Property Value

Color

Bold

Bold text in every cell of the range.

public bool Bold { get; set; }

Property Value

bool

BorderColor

Border color of the range's cells (with Borders).

public Color BorderColor { get; set; }

Property Value

Color

BorderWidth

Border width (px, default 1).

public int BorderWidth { get; set; }

Property Value

int

Borders

The same border for every cell (e.g. NoxBorders.All draws a full grid).

public NoxBorders Borders { get; set; }

Property Value

NoxBorders

Column

First column of the range.

public int Column { get; }

Property Value

int

ColumnCount

Number of columns in the range.

public int ColumnCount { get; }

Property Value

int

FontSize

Font size (pt). 0 uses the grid font size.

public float FontSize { get; set; }

Property Value

float

ForeColor

Text color of every cell in the range.

public Color ForeColor { get; set; }

Property Value

Color

Formula

Set: fills the range with the formula relative to the top-left cell. Relative references are shifted for each cell (like Excel fill: "=B1C1" → "=B2C2" in the second row). Get: the top-left cell's formula.

public string Formula { get; set; }

Property Value

string

Italic

Italic text in every cell of the range.

public bool Italic { get; set; }

Property Value

bool

Locked

Makes every cell in the range read-only.

public bool Locked { get; set; }

Property Value

bool

Row

First row of the range.

public int Row { get; }

Property Value

int

RowCount

Number of rows in the range.

public int RowCount { get; }

Property Value

int

Strikeout

Struck-out text in every cell of the range.

public bool Strikeout { get; set; }

Property Value

bool

Underline

Underlined text in every cell of the range.

public bool Underline { get; set; }

Property Value

bool

Value

Set: the same value in every cell of the range. Get: the top-left cell's value.

public object Value { get; set; }

Property Value

object

VerticalAlignment

Vertical alignment (Nothing uses the column setting).

public NoxVerticalAlignment? VerticalAlignment { get; set; }

Property Value

NoxVerticalAlignment?

WrapText

Word wrap (Nothing uses the column setting).

public bool? WrapText { get; set; }

Property Value

bool?

Methods

Clear()

Clears the values.

public void Clear()

ClearStyle()

Clears the formatting (colors, bold, read-only).

public void ClearStyle()

Merge()

Merges the range into one cell (the value is the top-left cell's).

public void Merge()

SetOutline(Color, int)

Border around the outside of the range only (inner cell borders are unchanged).

public void SetOutline(Color color, int width)

Parameters

color Color
width int

Unmerge()

Removes merges within the range.

public void Unmerge()