Showcase

Table

This documentation provides a comprehensive reference for the Table and TableColumn components, guiding you through their configuration options.
Demos

Screenshot #

Blazor Table Component

Table Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
BorderColor TableBorderColor None Gets or sets the border color of a bordered table (Bootstrap border-* utilities). 4.1.0
Bordered bool False Gets or sets whether the table has borders on all sides of the table and its cells (table-bordered). 4.1.0
Borderless bool False Gets or sets whether the table has no borders (table-borderless). 4.1.0
Caption string? null Gets or sets the caption text, rendered as the table's caption. CaptionTemplate wins when both are set. 4.1.0
CaptionClass string? null Gets or sets the CSS class added to the caption element. 4.1.0
CaptionTemplate RenderFragment? null Gets or sets the caption content, rendered as the table's caption. 4.1.0
CaptionTop bool False Gets or sets whether the caption shows above the table (caption-top) instead of below it. 4.1.0
ChildContent RenderFragment? null Gets or sets the TableColumn children that declare the columns. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Color TableColor None Gets or sets the color variant of the whole table (table-*). 4.1.0
Data IEnumerable<object?>? null Gets or sets the rows, one per item. While it is null, the table shows its loading state; when it is empty, it shows EmptyText or EmptyDataTemplate. 4.1.0
EmptyDataTemplate RenderFragment? null Gets or sets the content of the single row shown when Data is empty. Wins over EmptyText. 4.1.0
EmptyText string No records to display Gets or sets the text of the single row shown when Data is empty. 4.1.0
FooterTemplate RenderFragment? null Gets or sets the footer rows written by the consumer, rendered inside tfoot in place of the per-column footers. Use it for labels that span columns or for several footer rows. It is hidden while Data is null or empty. 4.1.0
GroupDivider bool False Gets or sets whether the table body puts a thicker border between itself and the head (table-group-divider). 4.1.0
HeaderColor TableColor None Gets or sets the color variant of the table head (table-* on thead), such as Light or Dark. 4.1.0
Hover bool False Gets or sets whether body rows highlight on hover (table-hover). 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
LoadingTemplate RenderFragment? null Gets or sets the content shown in the body while Data is null, in place of the placeholder rows. 4.1.0
Responsive bool False Gets or sets whether the table scrolls horizontally inside its own wrapper at every width (table-responsive). ResponsiveBreakpoint wins when it is set. 4.1.0
ResponsiveBreakpoint TableResponsiveBreakpoint None Gets or sets the width below which the table scrolls horizontally inside its own wrapper (table-responsive-*). 4.1.0
RowActive Func<object?, bool>? null Gets or sets the function that marks a row active (table-active). 4.1.0
RowClass Func<object?, string>? null Gets or sets the function that returns custom CSS classes for a row. 4.1.0
RowColor Func<object?, TableColor>? null Gets or sets the function that returns a row's color variant (table-*). 4.1.0
RowKeySelector Func<object?, object>? null Gets or sets the function that returns a unique key for each row, so rows are kept, not re-created, when the same records come back as new instances. Keys must be unique. When it is not set, rows have no key and are matched by position. 4.1.0
Small bool False Gets or sets whether the table uses compact cell padding (table-sm). 4.1.0
Striped bool False Gets or sets whether body rows have zebra stripes (table-striped). 4.1.0
StripedColumns bool False Gets or sets whether columns have zebra stripes (table-striped-columns). 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
TableContainerClass string? null Gets or sets the CSS class added to the responsive wrapper, which renders only when Responsive or ResponsiveBreakpoint is set. 4.1.0
TableContainerStyle string? null Gets or sets the inline style of the responsive wrapper, which renders only when Responsive or ResponsiveBreakpoint is set. 4.1.0
VerticalAlignment TableVerticalAlignment None Gets or sets the vertical alignment of every cell (align-*). A column can override it. 4.1.0
VisuallyHiddenCaption bool False Gets or sets whether the caption is kept for screen readers only (visually-hidden). 4.1.0

TableColumn Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
CellActive Func<object?, bool>? null Gets or sets the function that marks this column's cell active (table-active) for a row item. 4.1.0
CellColor Func<object?, TableColor>? null Gets or sets the function that returns this column's cell color variant (table-*) for a row item. 4.1.0
ChildContent RenderFragment<object?>? null Gets or sets the content of this column's cell, rendered once per row with the row item as context. A column without it renders empty cells. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
ColumnClass Func<object?, string>? null Gets or sets the function that returns custom CSS classes for this column's cell in a row. 4.1.0
FooterTemplate RenderFragment? null Gets or sets the content of this column's footer cell. Wins over FooterText. 4.1.0
FooterText string? null Gets or sets the text of this column's footer cell. 4.1.0
HeaderClass string? null Gets or sets the CSS class added to this column's header cell (th). 4.1.0
HeaderContent RenderFragment? null Gets or sets the content of this column's header cell. Wins over HeaderText. 4.1.0
HeaderStyle string? null Gets or sets the inline style of this column's header cell (th). 4.1.0
HeaderText string? null Gets or sets the text of this column's header cell. 4.1.0
HeaderTextAlignment Alignment Start Gets or sets the horizontal alignment of this column's header cell. Every value except None adds its text-* class, which overrides alignment set by page CSS; None adds no class, so the cells keep the alignment they inherit. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
IsRowHeader bool False Gets or sets whether this column's body cells are row headers (th scope="row") instead of data cells. 4.1.0
IsVisible bool True Gets or sets whether the column is shown. A hidden column renders no header, body, footer, or placeholder cell. Prefer it over wrapping the column in @if, which moves the column to the end when it comes back. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
TextAlignment Alignment Start Gets or sets the horizontal alignment of this column's body and footer cells. Every value except None adds its text-* class, which overrides alignment set by page CSS; None adds no class, so the cells keep the alignment they inherit. 4.1.0
TextNoWrap bool False Gets or sets whether this column's header, body, and footer cells keep their text on one line (text-nowrap). 4.1.0
VerticalAlignment TableVerticalAlignment None Gets or sets the vertical alignment of this column's body cells (align-*); None follows the table. 4.1.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.