RangeRef Struct

Represents a range of cells in a spreadsheet.

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public struct RangeRef

Constructors

RangeReflink

Initializes a new instance of the RangeRef struct with the specified start and end cell references.

Declaration
public RangeRef(Documents.Spreadsheet.CellRef start, Documents.Spreadsheet.CellRef end)
Parameters

Properties

Collapsedlink

Checks if this range is collapsed, meaning the start and end cell references are the same.

Declaration
public bool Collapsed { get; }
Property Value
Type Description
boolChecks if this range is collapsed, meaning the start and end cell references are the same.

Columnslink

Gets the number of columns in the range.

Declaration
public int Columns { get; }
Property Value
Type Description
intGets the number of columns in the range.

Endlink

Gets the ending cell reference of the range.

Declaration
public Documents.Spreadsheet.CellRef End { get; }
Property Value
Type Description
Documents.Spreadsheet.CellRefGets the ending cell reference of the range.

Invalidlink

Represents an invalid range reference, which is used to indicate that a range is not defined or does not exist.

Declaration
public Documents.Spreadsheet.RangeRef Invalid { get; }
Property Value
Type Description
Documents.Spreadsheet.RangeRefRepresents an invalid range reference, which is used to indicate that a range is not defined or does not exist.

Rowslink

Gets the number of rows and columns in the range.

Declaration
public int Rows { get; }
Property Value
Type Description
intGets the number of rows and columns in the range.

Startlink

Gets the starting cell reference of the range.

Declaration
public Documents.Spreadsheet.CellRef Start { get; }
Property Value
Type Description
Documents.Spreadsheet.CellRefGets the starting cell reference of the range.

Methods

Containslink

Checks if this range contains a specific row address.

Declaration
public bool Contains(Documents.Spreadsheet.RowRef address)
Parameters
Type Name Description
Documents.Spreadsheet.RowRef address
Returns
Type Description
bool

Containslink

Checks if this range contains a specific row address.

Declaration
public bool Contains(Documents.Spreadsheet.ColumnRef address)
Parameters
Type Name Description
Documents.Spreadsheet.ColumnRef address
Returns
Type Description
bool

Containslink

Checks if this range contains a specific row address.

Declaration
public bool Contains(int row, int column)
Parameters
Type Name Description
int row
int column
Returns
Type Description
bool

Containslink

Checks if this range contains a specific row address.

Declaration
public bool Contains(Documents.Spreadsheet.CellRef address)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef address
Returns
Type Description
bool

Equalslink

Checks if this RangeRef instance is equal to another RangeRef instance.

Declaration
public bool Equals(Documents.Spreadsheet.RangeRef other)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef other
Returns
Type Description
bool

Equalslink

Checks if this RangeRef instance is equal to another RangeRef instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool

FromCelllink

Creates a new RangeRef instance from two cell references, representing the start and end of the range.

Declaration
public static Documents.Spreadsheet.RangeRef FromCell(Documents.Spreadsheet.CellRef cell)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef cell
Returns

FromCellslink

Creates a new RangeRef instance from two cell references, representing the start and end of the range.

Declaration
public static Documents.Spreadsheet.RangeRef FromCells(Documents.Spreadsheet.CellRef start, Documents.Spreadsheet.CellRef end)
Parameters
Returns

GetCellslink

Returns a collection of cell references that represent all the cells in the range.

Declaration
public IEnumerable<Documents.Spreadsheet.CellRef> GetCells()
Returns
Type Description
IEnumerable<Documents.Spreadsheet.CellRef>

GetHashCodelink

Declaration
public override int GetHashCode()
Returns
Type Description
int

Intersectionlink

Calculates the intersection of this range with another range.

Declaration
public Documents.Spreadsheet.RangeRef Intersection(Documents.Spreadsheet.RangeRef other)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef other
Returns

Overlapslink

Checks if this range overlaps with another range.

Declaration
public bool Overlaps(Documents.Spreadsheet.RangeRef other)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef other
Returns
Type Description
bool

Parselink

Parses a string representation of a range into a RangeRef instance.

Declaration
public static Documents.Spreadsheet.RangeRef Parse(string range)
Parameters
Type Name Description
string range
Returns

ToStringlink

Returns a string representation of the range in A1 notation (e.g., "A1:B2").

Declaration
public override string ToString()
Returns
Type Description
string

Operators

operator !=link

Declaration
public static bool operator !=(Documents.Spreadsheet.RangeRef left, Documents.Spreadsheet.RangeRef right)
Parameters
Returns
Type Description
bool

operator ==link

Declaration
public static bool operator ==(Documents.Spreadsheet.RangeRef left, Documents.Spreadsheet.RangeRef right)
Parameters
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙