DataGrid<T>
daisyUI replacement for MudDataGrid<T>. Renders a .table with a sortable
header and a paged body. Supports client-side paging/sort over DataGrid<T>.Items or
server-side data via DataGrid<T>.ServerData / DataGrid<T>.ServerDataFunc.
Type parameters
Section titled “Type parameters”T— Row item type.
Properties
Section titled “Properties”Bordered
Section titled “Bordered”Render outer/inner borders.
ChildContent
Section titled “ChildContent”Alternative slot for column declarations.
CSS class applied to the table wrapper.
Columns
Section titled “Columns”Column declarations.
Compact row styling.
EffectivePageSize
Section titled “EffectivePageSize”Effective rows per page.
Elevation
Section titled “Elevation”Elevation (accepted for MudBlazor parity; mapped to a shadow class).
FirstItemIndex
Section titled “FirstItemIndex”Index of the first row shown on the current page (1-based; 0 when empty).
Highlight rows on hover.
IsServerData
Section titled “IsServerData”True when bound to a server-data source.
Local item source. Mutually exclusive with the server-data callbacks.
LastItemIndex
Section titled “LastItemIndex”Index of the last row shown on the current page.
Loading
Section titled “Loading”Loading state (shows DataGrid<T>.LoadingContent when set, else skeleton rows).
LoadingContent
Section titled “LoadingContent”Content shown while DataGrid<T>.Loading is true.
NoRecordsContent
Section titled “NoRecordsContent”Content shown when there are no rows.
Current zero-based page index.
PageCount
Section titled “PageCount”Total number of pages.
PagerContent
Section titled “PagerContent”Pager content (typically a DataGridPager<T>).
PageSize
Section titled “PageSize”Alias for DataGrid<T>.RowsPerPage.
PageSizeOptions
Section titled “PageSizeOptions”Page-size options offered by the pager.
ReadOnly
Section titled “ReadOnly”Read-only flag (accepted for MudBlazor parity; no effect on rendering).
RowClick
Section titled “RowClick”Raised when a row is clicked.
RowsPerPage
Section titled “RowsPerPage”Rows per page. DataGrid<T>.PageSize is an alias.
RowStyle
Section titled “RowStyle”Inline style applied to each body row (e.g. “cursor: pointer;”).
ServerData
Section titled “ServerData”Server-data loader (with cancellation). Mirrors the wrapper’s signature.
ServerDataFunc
Section titled “ServerDataFunc”Server-data loader (no cancellation token).
SkeletonRows
Section titled “SkeletonRows”Number of skeleton rows rendered while loading without a DataGrid<T>.LoadingContent.
SortDefinitions
Section titled “SortDefinitions”Active sort definitions keyed by column identifier (mirrors MudBlazor).
Striped
Section titled “Striped”Zebra striping.
Inline style applied to the table wrapper.
TotalItems
Section titled “TotalItems”Total number of rows across all pages.
Methods
Section titled “Methods”AddColumn(Column<T>)
Section titled “AddColumn(Column<T>)”Registers a column (called by child columns on init).
ReloadServerData()
Section titled “ReloadServerData()”Forces a reload from the server-data source (no-op for client-side data).
SetPageAsync(int)
Section titled “SetPageAsync(int)”Sets the current page and refreshes the body.
SetPageSizeAsync(int)
Section titled “SetPageSizeAsync(int)”Changes the page size, resets to the first page, and refreshes.
UsePageSizeOptions(int[])
Section titled “UsePageSizeOptions(int[])”Lets a child pager supply the page-size options without externally setting the parameter.