Class MBDataTable<TItem>
This is a general purpose Material Theme data table.
public class MBDataTable<TItem> : ComponentFoundation, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Type Parameters
TItem
- Inheritance
-
MBDataTable<TItem>
- Implements
- Inherited Members
Constructors
MBDataTable()
public MBDataTable()
Properties
Density
The data table's density.
[Parameter]
public MBDensity? Density { get; set; }
Property Value
GetKeysFunc
A function delegate to return the parameters for @key
attributes. If unused
"fake" keys set to GUIDs will be used.
[Parameter]
public Func<TItem, object> GetKeysFunc { get; set; }
Property Value
HasProgressBar
Determines whether the data table has a progress bar.
[Parameter]
public bool HasProgressBar { get; set; }
Property Value
Items
Data to render in the TableRow render fragment.
[Parameter]
public IEnumerable<TItem> Items { get; set; }
Property Value
- IEnumerable<TItem>
Paginator
Render fragment to contain an MBPaginator.
[Parameter]
public RenderFragment Paginator { get; set; }
Property Value
ShowProgress
Determines whether the data table has a progress bar.
[Parameter]
public bool ShowProgress { get; set; }
Property Value
StickyHeader
If true, makes the header sticky.
[Parameter]
public bool StickyHeader { get; set; }
Property Value
TableHeader
The table header as a render fragment using <th>
HTML elements.
[Parameter]
public RenderFragment TableHeader { get; set; }
Property Value
TableRow
Render fragment for each row of the table using <td>
HTML elements.
[Parameter]
public RenderFragment<TItem> TableRow { get; set; }
Property Value
- RenderFragment<TItem>
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
protected override Task OnInitializedAsync()
Returns
OnParametersSetAsync()
When overriding this, call await base.OnParametersSetAsync();
before any user code unless there is a very good reason not to.
protected override Task OnParametersSetAsync()