Examples
Declare columns as on DataGrid; the Actions template renders right-aligned per-row buttons, and paging comes built in.
| Actions | |||
|---|---|---|---|
| Billing revamp | Ana Silva | 14 | |
| Mobile app | Tom Becker | 27 | |
| Customer portal | Priya Nair | 9 | |
| Status page | Lucas Martin | 3 | |
| Data export API | Mei Chen | 18 |
Loading shows skeleton rows; with no items, EmptyIcon and EmptyMessage fill the body.
| Ana Silva | Pro, annual |
| Tom Becker | Free |
| Priya Nair | Enterprise |
API
<DataTable<T>>
DaisyBlazor.DataReusable DataGrid<T> wrapper with sensible defaults for server-side paging, sort state, skeleton loading, and an empty-state slot.
Parameters
- ActionsTitle string= "Actions"
Header text of the Actions column. Defaults to "Actions".
- Dense bool= false
When true, applies dense styling.
- Elevation int= 0
Elevation for the grid surface.
- EmptyIcon string= null
Icon shown in the empty state. Defaults to SearchOff.
- EmptyMessage string= null
Empty-state message. Defaults to "No records found"; pass a localized string to override.
- Items IEnumerable<
T> = nullLocal items source. Mutually exclusive with ServerData.
- Loading bool= false
When true, replaces row content with skeleton placeholders.
- PageSizeOptions int[]= [10, 25, 50]
Page-size options shown in the pager.
- RowsPerPage int?= null
Initial rows per page. Defaults to the first entry of PageSizeOptions.
- ServerData Func<
GridState< T>, CancellationToken, Task< GridData< T>>> = nullServer-data loader. Mutually exclusive with Items.
- SkeletonRows int= 5
Number of skeleton rows rendered while Loading.
- Class string= null
Additional CSS classes applied to the grid.
- Style string= null
Inline style applied to the grid.
Content
- Actions RenderFragment<
T> Optional per-row action template rendered as the last column.
- Columns RenderFragment
Column declarations (use PropertyColumn/TemplateColumn).