Table Class

Represents an Excel-style structured data table over a range of cells.

Inheritance

Object

Documents.Spreadsheet.Table

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class Table

Properties

Columnslink

The columns of the table, in left-to-right order.

Declaration
public IReadOnlyList<Documents.Spreadsheet.TableColumn> Columns { get; }
Property Value
Type Description
IReadOnlyList<Documents.Spreadsheet.TableColumn>The columns of the table, in left-to-right order.

DataBodyRangelink

The data body range — the table range minus the header row (if shown) and totals row (if shown).

Declaration
public Documents.Spreadsheet.RangeRef DataBodyRange { get; }
Property Value
Type Description
Documents.Spreadsheet.RangeRefThe data body range — the table range minus the header row (if shown) and totals row (if shown).

DisplayNamelink

Friendly display name; defaults to Name if not set explicitly.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
stringFriendly display name; defaults to Name if not set explicitly.

Filterlink

Auto-filter that drives header dropdowns and persists filter state.

Declaration
public Documents.Spreadsheet.AutoFilter Filter { get; }
Property Value
Type Description
Documents.Spreadsheet.AutoFilterAuto-filter that drives header dropdowns and persists filter state.

HeaderRowRangelink

The range of the header row, or null if ShowHeaderRow is false.

Declaration
public Documents.Spreadsheet.RangeRef? HeaderRowRange { get; }
Property Value
Type Description
Documents.Spreadsheet.RangeRef?The range of the header row, or null if ShowHeaderRow is false.

HighlightFirstColumnlink

Highlights the first column (typically a label column).

Declaration
public bool HighlightFirstColumn { get; set; }
Property Value
Type Description
boolHighlights the first column (typically a label column).

HighlightLastColumnlink

Highlights the last column (typically a totals column).

Declaration
public bool HighlightLastColumn { get; set; }
Property Value
Type Description
boolHighlights the last column (typically a totals column).

Namelink

The unique table name used in structured references (e.g. =SUM(Sales[Amount])). Must be unique within the workbook. Set by the constructor; rename via this setter.

Declaration
public string Name { get; set; }
Property Value
Type Description
stringThe unique table name used in structured references (e.g. =SUM(Sales[Amount])). Must be unique within the workbook. Set by the constructor; rename via this setter.

Rangelink

The full range of the table including header and totals rows.

Declaration
public Documents.Spreadsheet.RangeRef Range { get; }
Property Value
Type Description
Documents.Spreadsheet.RangeRefThe full range of the table including header and totals rows.

ShowBandedColumnslink

Whether banded column striping is applied. Defaults to false.

Declaration
public bool ShowBandedColumns { get; set; }
Property Value
Type Description
boolWhether banded column striping is applied. Defaults to false.

ShowBandedRowslink

Whether banded row striping is applied. Defaults to true.

Declaration
public bool ShowBandedRows { get; set; }
Property Value
Type Description
boolWhether banded row striping is applied. Defaults to true.

ShowFilterButtonlink

Whether the filter buttons render on header cells. Defaults to true.

Declaration
public bool ShowFilterButton { get; set; }
Property Value
Type Description
boolWhether the filter buttons render on header cells. Defaults to true.

ShowHeaderRowlink

Whether the header row is shown. Defaults to true. Toggling at runtime is a structural operation matching Excel's behavior: - true → false: clears the current top row's cells (values + formula + format), shrinks Range upward by one row, and disables ShowFilterButton. - false → true: expands Range upward by one row, writes default header values (each Name) into the new top row, and enables ShowFilterButton.

Declaration
public bool ShowHeaderRow { get; set; }
Property Value
Type Description
boolWhether the header row is shown. Defaults to true. Toggling at runtime is a structural operation matching Excel's behavior: - true → false: clears the current top row's cells (values + formula + format), shrinks Range upward by one row, and disables ShowFilterButton. - false → true: expands Range upward by one row, writes default header values (each Name) into the new top row, and enables ShowFilterButton.

ShowTotalslink

Whether the totals row is shown. Defaults to false. Toggling at runtime is a structural operation matching Excel's behavior: - false → true: Range expands by one row downward, "Total" is written into the new row's first column, and any column-level TotalsCalculation values are applied as SUBTOTAL formulas. - true → false: the totals row's cells (values + formulas + format) are cleared and Range shrinks back by one row.

Declaration
public bool ShowTotals { get; set; }
Property Value
Type Description
boolWhether the totals row is shown. Defaults to false. Toggling at runtime is a structural operation matching Excel's behavior: - false → true: Range expands by one row downward, "Total" is written into the new row's first column, and any column-level TotalsCalculation values are applied as SUBTOTAL formulas. - true → false: the totals row's cells (values + formulas + format) are cleared and Range shrinks back by one row.

Startlink

The first visible cell in the table's range.

Declaration
public Documents.Spreadsheet.CellRef Start { get; }
Property Value
Type Description
Documents.Spreadsheet.CellRefThe first visible cell in the table's range.

TableStylelink

Built-in or named custom table style — e.g. TableStyleMedium2, TableStyleLight15. Defaults to TableStyleMedium2. Set to null to opt out of styling.

Declaration
public string TableStyle { get; set; }
Property Value
Type Description
stringBuilt-in or named custom table style — e.g. TableStyleMedium2, TableStyleLight15. Defaults to TableStyleMedium2. Set to null to opt out of styling.

TotalsRowRangelink

The range of the totals row, or null if ShowTotals is false.

Declaration
public Documents.Spreadsheet.RangeRef? TotalsRowRange { get; }
Property Value
Type Description
Documents.Spreadsheet.RangeRef?The range of the totals row, or null if ShowTotals is false.

Worksheetlink

The sheet this table is on.

Declaration
public Documents.Spreadsheet.Worksheet Worksheet { get; }
Property Value
Type Description
Documents.Spreadsheet.WorksheetThe sheet this table is on.

Methods

ConvertToRangelink

Removes the table abstraction but leaves the cell content untouched.

Declaration
public void ConvertToRange()

Deletelink

Removes the table. Cell content is preserved by default; pass true to also clear cells.

Declaration
public void Delete(bool clearCells)
Parameters
Type Name Description
bool clearCells

Resizelink

Resizes the table to a new range. Columns are added or trimmed accordingly.

Declaration
public void Resize(Documents.Spreadsheet.RangeRef newRange)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef newRange

Sortlink

Sorts the table by a single column. column is relative to the table (0 = first column of the table).

Declaration
public void Sort(SortOrder order, int column)
Parameters
Type Name Description
SortOrder order
int column

Sortlink

Sorts the table by a single column. column is relative to the table (0 = first column of the table).

Declaration
public void Sort(Documents.Spreadsheet.SortKey[] keys)
Parameters
Type Name Description
Documents.Spreadsheet.SortKey[] keys
An error has occurred. This app may no longer respond until reloaded. Reload 🗙