1.6 KiB
1.6 KiB
SbDataGrid
Data grid with sorting, filtering, pagination, selection, editing, and optional virtualization.
Features
- Modes: Client-side (
Items) or server-side (ItemsProviderreturningSbDataResponse<T>). - Columns:
SbColumnwithField,Title, sortable, filterable, editable, width, align, optional templates (cell, header, footer, filter, edit). - Sorting: Per-column;
OnSortChangedfor server-side. - Filtering: Column filters, filter bar,
OnFiltersChanged; operators and values inSbFilter. - Pagination: Page index/size, total count, optional page-size selector; works with both modes.
- Selection: None, single row, or multiple;
KeySelector,SelectedKeys/SelectedKeysChanged,SelectedItemsChanged. - Editing: Row or cell edit mode; optional inline save/cancel;
OnRowEditing,OnRowEdited,OnRowEditCancelled,OnCellEdited;CloneItemfor cancel. - Row details:
DetailTemplatefor expandable master-detail. - Virtualization:
VirtualizationEnabled,Height,RowHeight,OverscanCountfor large lists. - Export:
ExportToCsvAsync,ExportAllToCsvAsync. - Misc: Loading overlay, empty template, density, striped, hoverable, bordered, column resize, frozen columns, keyboard navigation, ARIA.
Usage Notes
- Use
LoadingwithIsOperationLoadingwhen data comes from async ops. - Prefer
KeySelectorfor stable row identity. - For server-side, map
SbDataRequest(paging, sort, filters) to your API and returnSbDataResponse<T>.
See DataGridPage in SufiChain.SufiBlazorDemo for examples.