CellStore Class

Represents a store for spreadsheet cells, allowing access and modification of cell values.

Inheritance

Object

Documents.Spreadsheet.CellStore

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class CellStore

Constructors

CellStorelink

Represents a store for spreadsheet cells, allowing access and modification of cell values.

Declaration
public CellStore(Documents.Spreadsheet.Worksheet sheet)
Parameters
Type Name Description
Documents.Spreadsheet.Worksheet sheet

Fields

datalink

Stores the cells in a dictionary, where the key is a tuple of (row, column).

Declaration
protected readonly Dictionary<ValueTuple<int, int>, Documents.Spreadsheet.Cell> data

Properties

Itemlink

Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.

Declaration
public Documents.Spreadsheet.Cell Item { get; set; }
Property Value
Type Description
Documents.Spreadsheet.CellGets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.

Itemlink

Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.

Declaration
public Documents.Spreadsheet.Cell Item { get; set; }
Property Value
Type Description
Documents.Spreadsheet.CellGets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.

Itemlink

Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.

Declaration
public Documents.Spreadsheet.Cell Item { get; set; }
Property Value
Type Description
Documents.Spreadsheet.CellGets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.

Worksheetlink

Gets the sheet that owns this cell store.

Declaration
public Documents.Spreadsheet.Worksheet Worksheet { get; }
Property Value
Type Description
Documents.Spreadsheet.WorksheetGets the sheet that owns this cell store.

Methods

EnsureWithinBoundslink

Ensures that the specified row and column indices are within the bounds of the sheet.

Declaration
protected void EnsureWithinBounds(int row, int column)
Parameters
Type Name Description
int row The row index to check.
int column The column index to check.

GetCustomTypelink

Gets the custom cell type for the specified cell, or null if no custom type is set.

Declaration
public string GetCustomType(int row, int column)
Parameters
Type Name Description
int row The row index of the cell.
int column The column index of the cell.
Returns
Type Description
stringThe custom type name, or null if no custom type is set.

SetCustomTypelink

Sets a custom cell type for the specified cell.

Declaration
public void SetCustomType(Documents.Spreadsheet.CellRef cell, string type)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef cell The cell reference.
string type The custom type name, or null to remove the custom type.

SetCustomTypelink

Sets a custom cell type for the specified cell.

Declaration
public void SetCustomType(Documents.Spreadsheet.RangeRef range, string type)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef range
string type The custom type name, or null to remove the custom type.

TryGetlink

Attempts to get a cell at the specified row and column. Returns true only if the cell has been populated. Does not create new cells.

Declaration
public bool TryGet(int row, int column, Documents.Spreadsheet.Cell& cell)
Parameters
Type Name Description
int row The row index of the cell.
int column The column index of the cell.
Documents.Spreadsheet.Cell& cell The cell at the specified row and column if it exists; otherwise, null.
Returns
Type Description
boolTrue if the cell exists in the store; otherwise, false.
An error has occurred. This app may no longer respond until reloaded. Reload 🗙