ClassCellRange
Defines a rectangular selection of cells within a worksheet, bounded by row and column indices, supporting operations like offset, intersection, and containment checks.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Model
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Syntax:
public class CellRange
Inheritance: objectCellRange
Constructors
CellRange(CellIndex, CellIndex)
Initializes a new instance of the CellRange class.
CellRange(int, int, int, int)
Initializes a new instance of the CellRange class.
Fields
Properties
ColumnCount
Gets the number of columns spanned by the range.
FromIndex
Gets the top-left cell index of the range.
Declaration
public CellIndex FromIndex { get; }
Property Value
The start index.
IsSingleCell
Gets whether the range contains exactly one cell (1 row × 1 column).
Declaration
public bool IsSingleCell { get; }
Property Value
The value indicating if the cell range is single cell range.
RowCount
Gets the number of rows spanned by the range.
Methods
Contains(CellIndex)
Checks whether the range includes the specified cell index.
Contains(CellRange)
Checks whether this range fully contains the specified cell range.
Contains(int, int)
Checks whether the range includes the cell at the specified row and column.
FromColumn(int)
Creates a range spanning all rows in the specified column.
FromColumnRange(int, int)
Creates a cell range of a range of columns.
FromRow(int)
Creates a range spanning all columns in the specified row.
FromRowRange(int, int)
Creates a cell range of a range of rows.
GetFirstColumn()
Gets the first column.
Declaration
public CellRange GetFirstColumn()
Returns
The cell range of the first column.
GetFirstRow()
Gets the first row.
Declaration
public CellRange GetFirstRow()
Returns
The cell range of the first row.
GetHashCode()
Serves as a hash function for a particular type.
GetLastColumn()
Gets the last column.
Declaration
public CellRange GetLastColumn()
Returns
The cell range of the last column.
GetLastRow()
Gets the last row.
Declaration
public CellRange GetLastRow()
Returns
The cell range of the last row.
Intersect(CellRange)
Computes the overlapping region between this range and another, or returns Empty if no overlap.
IntersectsWith(CellRange)
Checks whether this range overlaps with another cell range.
Offset(int, int)
Creates a new range by shifting this range by the specified row and column offsets, or returns null if out of bounds.