Class MudTr
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
A row of data within a MudTable<T>.
public class MudTr : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IDisposable
- Inheritance
-
MudTr
- Implements
- Inherited Members
- Extension Methods
Constructors
MudTr()
public MudTr()
Properties
ActionsStylename
protected string ActionsStylename { get; }
Property Value
Checkable
Displays a checkbox at the start of this row.
[Parameter]
public bool Checkable { get; set; }
Property Value
Remarks
Defaults to false
. Managed automatically by the parent MudTable<T>.
Checked
The state of the checkbox when Checkable is true
.
[Parameter]
public bool Checked { get; set; }
Property Value
CheckedChanged
Occurs when Checked has changed.
[Parameter]
public EventCallback<bool> CheckedChanged { get; set; }
Property Value
ChildContent
The content within this data row.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
Context
The current state of the MudTable<T> containing this data row.
[CascadingParameter]
public TableContext? Context { get; set; }
Property Value
Editable
Allows this row to be edited.
[Parameter]
public bool Editable { get; set; }
Property Value
Remarks
Defaults to false
. Managed automatically by the parent MudTable<T>.
Expandable
Allows this row to expand to display nested content.
[Parameter]
public bool Expandable { get; set; }
Property Value
Remarks
Defaults to false
. Managed automatically by the parent MudTable<T>.
Item
The data being displayed for this row.
[Parameter]
public object? Item { get; set; }
Property Value
SelectionChangeable
Prevents the change of the current selection.
[Parameter]
public bool SelectionChangeable { get; set; }
Property Value
Remarks
Defaults to true
. Requires Checkable to be true
. Managed automatically by the parent MudTable<T>.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Dispose()
Releases resources used by this row.
public void Dispose()
ManagePreviousEdition()
Resets this row's editing state.
public void ManagePreviousEdition()
Remarks
Typically occurs when another row has been selected. Managed automatically by the parent table.
OnInitializedAsync()
protected override Task OnInitializedAsync()
Returns
OnRowClickedAsync(MouseEventArgs)
Occurs when this row is clicked.
public Task OnRowClickedAsync(MouseEventArgs args)
Parameters
args
MouseEventArgsThe mouse coordinates of the click.
Returns
OnRowMouseEnterAsync(PointerEventArgs)
Occurs when the pointer enters this row.
public Task OnRowMouseEnterAsync(PointerEventArgs args)
Parameters
args
PointerEventArgsThe coordinates of the pointer.
Returns
OnRowMouseLeaveAsync(PointerEventArgs)
Occurs when the pointer leaves this row.
public Task OnRowMouseLeaveAsync(PointerEventArgs args)
Parameters
args
PointerEventArgsThe coordinates of the pointer.
Returns
SetChecked(bool, bool)
Sets Checked to the specified value.
public void SetChecked(bool checkedState, bool notify)
Parameters
checkedState
boolThe new checked state.
notify
boolWhen
true
, the table's OnHeaderCheckboxClicked(bool) event occurs.