MergedCellStore Class

Represents a store for merged cell ranges in a spreadsheet.

Inheritance

Object

Documents.Spreadsheet.MergedCellStore

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class MergedCellStore

Constructors

MergedCellStorelink

Represents a store for merged cell ranges in a spreadsheet.

Declaration
public MergedCellStore()

Properties

Rangeslink

Gets the list of merged cell ranges in the store.

Declaration
public IReadOnlyList<Documents.Spreadsheet.RangeRef> Ranges { get; }
Property Value
Type Description
IReadOnlyList<Documents.Spreadsheet.RangeRef>Gets the list of merged cell ranges in the store.

Methods

Addlink

Adds a merged cell range to the store.

Declaration
public void Add(Documents.Spreadsheet.RangeRef range)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef range

Containslink

Checks if the store contains a merged range that includes the specified cell address.

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

Containslink

Checks if the store contains a merged range that includes the specified cell address.

Declaration
public bool Contains(Documents.Spreadsheet.RangeRef range)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef range
Returns
Type Description
bool

GetMergedRangelink

Gets the merged range that contains the specified cell address. O(1) lookup via spatial index.

Declaration
public Documents.Spreadsheet.RangeRef GetMergedRange(Documents.Spreadsheet.CellRef address)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef address
Returns
Type Description
Documents.Spreadsheet.RangeRefThe merged range if found; otherwise, returns Invalid.

GetMergedRangeOrSelflink

Gets the merged range for the specified cell address, or returns the address as a range if no merged range is found.

Declaration
public Documents.Spreadsheet.RangeRef GetMergedRangeOrSelf(Documents.Spreadsheet.CellRef address)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef address
Returns

GetMergedRangeStartOrSelflink

Gets the start cell of the merged range that contains the specified cell address, or returns the address itself if no merged range is found.

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

GetOverlappingRangeslink

Gets a list of merged ranges that overlap with the specified range.

Declaration
public List<Documents.Spreadsheet.RangeRef> GetOverlappingRanges(Documents.Spreadsheet.RangeRef range)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef range
Returns
Type Description
List<Documents.Spreadsheet.RangeRef>

Removelink

Removes a merged cell range from the store.

Declaration
public bool Remove(Documents.Spreadsheet.RangeRef range)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef range
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙