Class CellRange
Represents a range of cells.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class CellRange
Constructors
CellRange(Int32, Int32, Int32, Int32)
Initializes a new instance of the CellRange class.
Declaration
public CellRange(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex)
Parameters
System.Int32
fromRowIndex
Start row index. |
System.Int32
fromColumnIndex
Start column index. |
System.Int32
toRowIndex
End row index. |
System.Int32
toColumnIndex
End column index. |
CellRange(CellIndex, CellIndex)
Initializes a new instance of the CellRange class.
Declaration
public CellRange(CellIndex fromIndex, CellIndex toIndex)
Parameters
CellIndex
fromIndex
Start index. |
CellIndex
toIndex
End index. |
Fields
Empty
Properties
ColumnCount
Gets the column count.
Declaration
public int ColumnCount { get; }
Property Value
System.Int32
The column count. |
FromIndex
Gets the start index.
Declaration
public CellIndex FromIndex { get; }
Property Value
CellIndex
The start index. |
IsSingleCell
Gets a value indicating if the cell range is single cell range.
Declaration
public bool IsSingleCell { get; }
Property Value
System.Boolean
The value indicating if the cell range is single cell range. |
RowCount
Gets the row count.
Declaration
public int RowCount { get; }
Property Value
System.Int32
The row count. |
ToIndex
Gets the end index.
Declaration
public CellIndex ToIndex { get; }
Property Value
CellIndex
The end index. |
Methods
Contains(Int32, Int32)
Determines whether the range contains the specified index.
Declaration
public bool Contains(int rowIndex, int columnIndex)
Parameters
System.Int32
rowIndex
Index of the row. |
System.Int32
columnIndex
Index of the column. |
Returns
System.Boolean
The value indicating whether the range contains the specified index. |
Contains(CellIndex)
Determines whether the range contains the specified index.
Declaration
public bool Contains(CellIndex index)
Parameters
CellIndex
index
The index. |
Returns
System.Boolean
The value indicating whether the range contains the specified index. |
Contains(CellRange)
Determines whether the range contains the specified cell range.
Declaration
public bool Contains(CellRange cellRange)
Parameters
CellRange
cellRange
The cell range. |
Returns
System.Boolean
The value indicating whether the range contains the specified range. |
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The System.Object to compare with the current System.Object. |
Returns
System.Boolean
True if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
FromColumn(Int32)
Creates a cell range of the specified column.
Declaration
public static CellRange FromColumn(int columnIndex)
Parameters
System.Int32
columnIndex
Index of the column. |
Returns
CellRange
The cell range of the specified column. |
FromColumnRange(Int32, Int32)
Creates a cell range of a range of columns.
Declaration
public static CellRange FromColumnRange(int fromColumnIndex, int toColumnIndex)
Parameters
System.Int32
fromColumnIndex
Start column. |
System.Int32
toColumnIndex
End column. |
Returns
CellRange
The cell range. |
FromRow(Int32)
Creates a cell range of the specified row.
Declaration
public static CellRange FromRow(int rowIndex)
Parameters
System.Int32
rowIndex
Index of the row. |
Returns
CellRange
The cell range of the specified row. |
FromRowRange(Int32, Int32)
Creates a cell range of a range of rows.
Declaration
public static CellRange FromRowRange(int fromRowIndex, int toRowIndex)
Parameters
System.Int32
fromRowIndex
Start row. |
System.Int32
toRowIndex
End row. |
Returns
CellRange
The cell range. |
GetFirstColumn()
Gets the first column.
Declaration
public CellRange GetFirstColumn()
Returns
CellRange
The cell range of the first column. |
GetFirstRow()
Gets the first row.
Declaration
public CellRange GetFirstRow()
Returns
CellRange
The cell range of the first row. |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
System.Int32
A hash code for the current System.Object. |
Overrides
GetLastColumn()
Gets the last column.
Declaration
public CellRange GetLastColumn()
Returns
CellRange
The cell range of the last column. |
GetLastRow()
Gets the last row.
Declaration
public CellRange GetLastRow()
Returns
CellRange
The cell range of the last row. |
Intersect(CellRange)
Intersects the present instance with another cell range.
Declaration
public CellRange Intersect(CellRange other)
Parameters
CellRange
other
The other cell range. |
Returns
CellRange
The intersection. |
IntersectsWith(CellRange)
Determines whether the present instance intersects with another cell range.
Declaration
public bool IntersectsWith(CellRange other)
Parameters
CellRange
other
The other cell range. |
Returns
System.Boolean
The value indicating whether the present instance intersects with another cell range. |
Offset(Int32, Int32)
Creates a new cell range using the present instance and a specified offset.
Declaration
public CellRange Offset(int rowOffset, int columnOffset)
Parameters
System.Int32
rowOffset
The row offset. |
System.Int32
columnOffset
The column offset. |
Returns
CellRange
The created cell range. |
ToString()
Returns a System.String that represents the current System.Object.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents the current System.Object. |