[]
        
(Showing Draft Content)

C1.Win.FlexGrid.CellRange

CellRange Struct

Represents cell ranges, allowing the caller to set properties for multiple cells with a single statement.

Namespace: C1.Win.FlexGrid
Assembly: C1.Win.FlexGrid.8.dll
Syntax
public struct CellRange
Remarks

The CellRange structure does not have a public constructor. To create a CellRange object, use the GetCellRange(int, int) method.

Note that CellRange is a structure, not a class. This means the object is used as a value, not as a reference. If you pass a CellRange to a method and change the object within that method, the original value is not modified.

Ranges are defined by two rows and two columns (r1, c1, r2, and c2). These values do not have to be in order (r1 may be smaller or greater than r2). To obtain the values in order, use the Normalize() method or the TopRow, BottomRow, LeftCol, and RightCol properties.

Properties

Name Description
BottomRow

Gets the index of the bottom row in the range.

Checkbox

Gets or sets the state of the checkbox in the range.

Clip

Gets or sets a string containing the values of all cells in the range.

Data

Gets or sets the data stored in the range.

DataDisplay

Gets the value in cell (r1, c1), formatted as a string.

Image

Gets or sets the Image assigned to cells in the range.

IsSingleCell

Gets a value that indicates if the range contains a single cell.

IsSingleColumn

Gets a value that indicates if the range contains a single column.

IsSingleRow

Gets a value that indicates if the range contains a single row.

IsValid

Gets a value that indicates if the range contains valid row and column indices.

LeftCol

Gets the index of the left column in the range.

RightCol

Gets the index of the right column in the range.

Style

Gets or sets the style used to display every cell in the range.

StyleDisplay

Gets the style used to render cell (r1, c1).

StyleNew

Gets or sets the style used to display every cell in the range, creating a new style if necessary.

TopRow

Gets the index of the top row in the range.

UserData

Gets or sets arbitrary used data assigned to cells in the range.

c1

Gets or sets the range's first column index.

c2

Gets or sets the range's last column index.

r1

Gets or sets the range's first row index.

r2

Gets or sets the range's last row index.

Methods

Name Description
Clear(ClearFlags)

Clears selected elements from the range.

Contains(int, int)

Determines whether the range contains a given cell.

ContainsCol(int)

Determines whether the range contains a given column.

ContainsRow(int)

Determines whether the range contains a given row.

Equals(object)

Indicates whether this CellRange and a specified CellRange are equal.

GetHashCode()

Gets a hash code for the CellRange.

Normalize()

Normalizes the range so that r1 is the TopRow, r2 is the BottomRow, c1 is the LeftCol, and c2 is the RightCol.

ToString()

Gets a string representation for this object.

Operators

Name Description
operator ==(CellRange, CellRange)

Checks if operands are equal.

operator !=(CellRange, CellRange)

Checks if operands are not equal.