Table of Contents

Class TableContext

Namespace
MudBlazor
Assembly
MudBlazor.dll

The current state of a MudTable<T>.

public abstract class TableContext
Inheritance
TableContext
Derived
Inherited Members
Extension Methods

Remarks

Typically used to share functionality across a table's related components.

Constructors

TableContext()

protected TableContext()

Properties

FooterRows

The footer rows within the table and its groups.

public List<MudTFootRow> FooterRows { get; set; }

Property Value

List<MudTFootRow>

HasPager

Whether the table containts a MudTablePager.

public bool HasPager { get; set; }

Property Value

bool

HeaderRows

The header rows within the table and its groups.

public List<MudTHeadRow> HeaderRows { get; set; }

Property Value

List<MudTHeadRow>

PagerStateHasChanged

The action taken when the table pager should be refreshed.

public Action? PagerStateHasChanged { get; set; }

Property Value

Action

SortDirection

The current sort direction of the table.

public abstract SortDirection SortDirection { get; protected set; }

Property Value

SortDirection

Table

The table linked to this context.

public MudTableBase? Table { get; set; }

Property Value

MudTableBase

TableStateHasChanged

The action taken when the table and related components should be refreshed.

public Action? TableStateHasChanged { get; set; }

Property Value

Action

Methods

Add(MudTr, object?)

Adds a row and its related data.

public abstract void Add(MudTr row, object? item)

Parameters

row MudTr

The row to add.

item object

The data associated with the row.

InitializeSorting()

Sets the initial sort direction when the table is initialized.

public abstract void InitializeSorting()

ManagePreviousEditedRow(MudTr)

Notifies any editing row that a new row has been selected.

public abstract void ManagePreviousEditedRow(MudTr row)

Parameters

row MudTr

The new row to edit.

Remove(MudTr, object?)

Removes a row and its related data.

public abstract void Remove(MudTr row, object? item)

Parameters

row MudTr

The row to remove.

item object

The data associated with the row.

UpdateRowCheckBoxes(bool, bool)

Refreshes the state of checkboxes in the table.

public abstract void UpdateRowCheckBoxes(bool updateGroups = true, bool updateHeaderFooter = true)

Parameters

updateGroups bool

When true, checkboxes in all groups will be refreshed.

updateHeaderFooter bool

When true, checkboxes in all headers and footers will be refreshed.