Table of Contents

Class BOBDataCollectionBase<TItem, TComponent, TVariant>

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll

Shared base for data-collection components (grid, cards) that own column registration, sorting, filtering, paging and selection state.

public abstract class BOBDataCollectionBase<TItem, TComponent, TVariant> : BOBVariantComponentBase<TComponent, TVariant>, IVariantComponent<TVariant>, IVariantComponent, IPureBuiltComponent, IBuiltComponent, IHasDensity, IHasSize, IHasShadow, IHasBorder, IHasBackgroundColor, IDataCollectionFamilyComponent where TComponent : BOBDataCollectionBase<TItem, TComponent, TVariant> where TVariant : Variant

Type Parameters

TItem

Row item type.

TComponent

Concrete derived component type (CRTP).

TVariant

Variant type owned by the derived component.

Inheritance
object
ComponentBase
BOBVariantComponentBase<TComponent, TVariant>
BOBDataCollectionBase<TItem, TComponent, TVariant>
Implements
Derived
Inherited Members

Constructors

BOBDataCollectionBase()

protected BOBDataCollectionBase()

Fields

ColumnRegistry

Column registration registry populated by child BOBDataColumn components during render.

protected readonly DataColumnRegistry<TItem> ColumnRegistry

Field Value

DataColumnRegistry<TItem>

ColumnsBuilt

True once columns have been captured from the Columns render fragment.

protected bool ColumnsBuilt

Field Value

bool

FilteredItems

Items remaining after filter+sort (full result set).

protected List<TItem> FilteredItems

Field Value

List<TItem>

LiveRegionMessage

Message announced via the live-region after filter/sort/page mutations.

protected string? LiveRegionMessage

Field Value

string

PaginationEnd

1-based index of the last visible row on the current page.

protected int PaginationEnd

Field Value

int

PaginationStart

1-based index of the first visible row on the current page.

protected int PaginationStart

Field Value

int

PreventRowKeyDown

Suppresses the next row keydown's default browser action (used by Enter/Space row selection).

protected bool PreventRowKeyDown

Field Value

bool

ProcessedItems

Items rendered after pagination (visible page).

protected List<TItem> ProcessedItems

Field Value

List<TItem>

RegisteredColumns

Registered columns frozen after the first render.

protected List<DataColumnRegistration<TItem>> RegisteredColumns

Field Value

List<DataColumnRegistration<TItem>>

State

Persistent state (filter / sort / page / column order) for this collection instance.

protected readonly DataCollectionState<TItem> State

Field Value

DataCollectionState<TItem>

TotalPages

Total number of pages for the current filtered set.

protected int TotalPages

Field Value

int

VisibleColumns

Subset of RegisteredColumns currently visible, in display order.

protected List<DataColumnRegistration<TItem>> VisibleColumns

Field Value

List<DataColumnRegistration<TItem>>

_preventHeaderKeyDefault

Backs the conditional @onkeydown:preventDefault binding on header cells.

protected bool _preventHeaderKeyDefault

Field Value

bool

Properties

BackgroundColor

Background color of the container. Accepts any valid CSS color value, PaletteColor or BOBColor.

[Parameter]
public string? BackgroundColor { get; set; }

Property Value

string

Border

Border style applied to the container.

[Parameter]
public BorderStyle? Border { get; set; }

Property Value

BorderStyle

BulkActions

Bulk actions rendered in the toolbar when at least one row is selected. Pair with SelectionMode = Multiple to expose mass-edit / delete / export workflows.

[Parameter]
public IReadOnlyList<DataCollectionBulkAction<TItem>>? BulkActions { get; set; }

Property Value

IReadOnlyList<DataCollectionBulkAction<TItem>>

Columns

Column definitions rendered inside the data collection.

[Parameter]
public RenderFragment? Columns { get; set; }

Property Value

RenderFragment

CustomFilter

Custom predicate used to filter items. Receives the item and the search text.

[Parameter]
public Func<TItem, string, bool>? CustomFilter { get; set; }

Property Value

Func<TItem, string, bool>

DataSource

Strategy that materialises rows. When set, drives the visible page via LoadAsync(DataRequest, CancellationToken) — the host component translates its sort / filter / page state into a DataRequest and renders the returned Items. Takes precedence over Items when both are supplied.

Default null preserves the legacy Items path. Use InMemoryDataSource<TItem> for in-process collections you want to route through the new contract (e.g. for testing parity), and RemoteDataSource<TItem> for server-side paging.

[Parameter]
public IDataCollectionDataSource<TItem>? DataSource { get; set; }

Property Value

IDataCollectionDataSource<TItem>

DefaultSortColumn

Name of the column to sort by on initial render.

[Parameter]
public string? DefaultSortColumn { get; set; }

Property Value

string

DefaultSortDirection

Initial sort direction. Defaults to Ascending.

[Parameter]
public SortDirection DefaultSortDirection { get; set; }

Property Value

SortDirection

Density

Vertical density (gap) of rows.

[Parameter]
public BOBDensity Density { get; set; }

Property Value

BOBDensity

DraggingColumnHeader

Header currently being dragged for reorder, or null when idle.

protected string? DraggingColumnHeader { get; }

Property Value

string

EmptyActionTemplate

Optional CTA template rendered alongside the empty state — pair with EmptyContent for "Create first record" buttons without rewriting the entire empty layout.

[Parameter]
public RenderFragment? EmptyActionTemplate { get; set; }

Property Value

RenderFragment

EmptyContent

Custom template rendered when there are no items to display.

[Parameter]
public RenderFragment? EmptyContent { get; set; }

Property Value

RenderFragment

EnableVirtualization

When true, only visible rows are rendered (improves performance for large lists).

[Parameter]
public bool EnableVirtualization { get; set; }

Property Value

bool

Error

Error message. When non-empty (and Loading is off) the data area renders ErrorContent or a default error state instead of the rows.

[Parameter]
public string? Error { get; set; }

Property Value

string

ErrorContent

Optional error template rendered in place of the data when Error is non-empty. Useful for surfacing remote-load failures without leaving an empty grid.

[Parameter]
public RenderFragment? ErrorContent { get; set; }

Property Value

RenderFragment

FilterPlaceholder

Placeholder text for the filter search box.

[Parameter]
public string FilterPlaceholder { get; set; }

Property Value

string

Filterable

When true, a search box filters the displayed items.

[Parameter]
public bool Filterable { get; set; }

Property Value

bool

Height

Fixed height of the container. Required for virtualization and fixed header.

[Parameter]
public string? Height { get; set; }

Property Value

string

Hoverable

When true (default), rows highlight on hover.

[Parameter]
public bool Hoverable { get; set; }

Property Value

bool

IsInteractiveRow

True when rows respond to clicks (either selection or OnRowClick).

protected bool IsInteractiveRow { get; }

Property Value

bool

IsResizing

true while the user holds the resize handle on a column. Drives rendering of the full-grid drag overlay that captures pointermove / pointerup.

protected bool IsResizing { get; }

Property Value

bool

ItemPattern

Alternating row style pattern (e.g. zebra striping).

[Parameter]
public RowStylePattern? ItemPattern { get; set; }

Property Value

RowStylePattern

Items

Data items to display. Used by the legacy in-memory pipeline; ignored when DataSource is non-null.

[Parameter]
public IEnumerable<TItem>? Items { get; set; }

Property Value

IEnumerable<TItem>

Loading

When true, the loading template is shown.

[Parameter]
public bool Loading { get; set; }

Property Value

bool

LoadingContent

Custom template rendered while Loading is true.

[Parameter]
public RenderFragment? LoadingContent { get; set; }

Property Value

RenderFragment

LoadingMode

Visual mode used while Loading is on. Default Spinner — switch to Skeleton for animated row placeholders.

[Parameter]
public LoadingMode LoadingMode { get; set; }

Property Value

LoadingMode

Localizer

Localized strings for data-collection UI text (filter placeholders, aria-labels, live-region messages).

[Inject]
protected IStringLocalizer<BOBDataResources> Localizer { get; set; }

Property Value

IStringLocalizer<BOBDataResources>

OnFilter

Raised when the filter text changes.

[Parameter]
public EventCallback<DataCollectionFilterEventArgs> OnFilter { get; set; }

Property Value

EventCallback<DataCollectionFilterEventArgs>

OnPageChange

Raised when the current page changes.

[Parameter]
public EventCallback<DataCollectionPageChangeEventArgs> OnPageChange { get; set; }

Property Value

EventCallback<DataCollectionPageChangeEventArgs>

OnRowClick

Raised when a row is clicked and SelectionMode is not active.

[Parameter]
public EventCallback<TItem> OnRowClick { get; set; }

Property Value

EventCallback<TItem>

OnSort

Raised when the sort column or direction changes.

[Parameter]
public EventCallback<DataCollectionSortEventArgs> OnSort { get; set; }

Property Value

EventCallback<DataCollectionSortEventArgs>

PageSize

Number of items per page. When null, pagination is disabled.

[Parameter]
public int? PageSize { get; set; }

Property Value

int?

PageSizeOptions

Available page sizes shown in the page-size selector.

[Parameter]
public int[] PageSizeOptions { get; set; }

Property Value

int[]

PersistenceKey

Optional storage key for the registered IDataCollectionStatePersistence. When set, the persistable slice of State (filter / sort / page / column order / column filters) is loaded on first render and saved after every state mutation. Default null = no persistence (the registered service is only consulted when this is non-empty).

[Parameter]
public string? PersistenceKey { get; set; }

Property Value

string

Reorderable

When true, headers receive tabindex="0" + an Alt+ArrowLeft / Alt+ArrowRight keyboard shortcut that shifts the focused column toward the start or end of the row. Default false for backwards-compat. Drag-based reorder is a separate slice (I1.S4 follow-up).

[Parameter]
public bool Reorderable { get; set; }

Property Value

bool

Resizable

When true, columns whose Resizable parameter is on render a drag handle on their trailing edge so the user can resize them via pointer events. The drag clamps to each column's MinWidth / MaxWidth and writes the new width to ColumnWidths; the value participates in the persistence round-trip.

[Parameter]
public bool Resizable { get; set; }

Property Value

bool

ResolvedFilterPlaceholder

Localized placeholder when the caller does not override FilterPlaceholder.

protected string ResolvedFilterPlaceholder { get; }

Property Value

string

RowActions

Per-row action buttons rendered in a sticky-right action column (grid) or as an icon strip on each card. Clicks on action buttons stop propagation, so the row click only fires for non-action targets.

[Parameter]
public IReadOnlyList<DataCollectionRowAction<TItem>>? RowActions { get; set; }

Property Value

IReadOnlyList<DataCollectionRowAction<TItem>>

RowDetailTemplate

Optional master-detail template. When non-null, every row gets a chevron toggle that expands a sub-row containing the rendered fragment. Useful for showing related data (order lines, audit trail) without navigation.

With EnableVirtualization the variable row height breaks scroll-position math; pin a fixed ItemSize on <Virtualize> when expansion is on.

[Parameter]
public RenderFragment<TItem>? RowDetailTemplate { get; set; }

Property Value

RenderFragment<TItem>

SelectedItems

Currently selected items. Use with two-way binding.

[Parameter]
public HashSet<TItem>? SelectedItems { get; set; }

Property Value

HashSet<TItem>

SelectedItemsChanged

Raised when the selection changes.

[Parameter]
public EventCallback<HashSet<TItem>> SelectedItemsChanged { get; set; }

Property Value

EventCallback<HashSet<TItem>>

SelectionMode

Row selection mode.

[Parameter]
public SelectionMode SelectionMode { get; set; }

Property Value

SelectionMode

Shadow

Shadow style applied to the container.

[Parameter]
public ShadowStyle? Shadow { get; set; }

Property Value

ShadowStyle

ShowColumnFilters

When true, render a per-column text filter input below the header label for every BOBDataColumn<TItem> with Filterable=true. Per-column filters AND-combine with the toolbar Filterable search box. Default false for backwards-compat.

[Parameter]
public bool ShowColumnFilters { get; set; }

Property Value

bool

ShowPageSizeSelector

When true, a dropdown lets the user change the page size.

[Parameter]
public bool ShowPageSizeSelector { get; set; }

Property Value

bool

Size

Visual size of the data collection.

[Parameter]
public BOBSize Size { get; set; }

Property Value

BOBSize

SortAppendBehavior

Sort Append Behavior for multi-column sorting. Defaults to Always. Values are None, Always, CtrlKey, ShiftKey, CtrlOrShiftKey.

[Parameter]
public SortAppendBehavior SortAppendBehavior { get; set; }

Property Value

SortAppendBehavior

Sortable

When true, column headers are clickable for sorting.

[Parameter]
public bool Sortable { get; set; }

Property Value

bool

UsePerItemPatternStyles

True when the row pattern must be applied per-item (inline) rather than via container CSS.

protected bool UsePerItemPatternStyles { get; }

Property Value

bool

UsesItemsProvider

true when the host should hand row materialisation to a Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize<TItem> ItemsProvider (lazy infinite scroll) instead of the explicit pagination footer. Triggered by DataSource + EnableVirtualization + a non-empty Height — the height is required for Virtualize to compute the scroll viewport.

protected bool UsesItemsProvider { get; }

Property Value

bool

VirtualizeRef

Reference to the Virtualize component when running in ItemsProvider mode — derived components wire it via @ref so the base can call RefreshDataAsync() after filter / sort / column-filter mutations.

protected Virtualize<TItem>? VirtualizeRef { get; set; }

Property Value

Virtualize<TItem>

Methods

ApplyFilter(IEnumerable<TItem>)

Applies global + per-column filters using the shared pipeline. Delegates to BlazOrbit.Components.DataCollectionPipeline so the legacy Items path and the InMemoryDataSource<TItem> wrapper agree on filter semantics.

protected IEnumerable<TItem> ApplyFilter(IEnumerable<TItem> items)

Parameters

items IEnumerable<TItem>

Returns

IEnumerable<TItem>

ApplyPagination(IEnumerable<TItem>)

Returns the slice for the current page using the shared pipeline. No-op when pagination is disabled (PageSize is null).

protected IEnumerable<TItem> ApplyPagination(IEnumerable<TItem> items)

Parameters

items IEnumerable<TItem>

Returns

IEnumerable<TItem>

ApplySort(IEnumerable<TItem>)

Multi-column sort using the shared pipeline. Honours per-column custom comparers then falls back to ValueSelector. Returns the input unchanged when no descriptors are active.

protected IEnumerable<TItem> ApplySort(IEnumerable<TItem> items)

Parameters

items IEnumerable<TItem>

Returns

IEnumerable<TItem>

BuildComponentCssVariables(Dictionary<string, string>)

Contributes CSS custom properties on the root <bob-component> for the active row pattern.

public virtual void BuildComponentCssVariables(Dictionary<string, string> cssVariables)

Parameters

cssVariables Dictionary<string, string>

BuildComponentDataAttributes(Dictionary<string, object>)

Contributes data-* attributes on the root <bob-component> (hover, row-pattern).

public virtual void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)

Parameters

dataAttributes Dictionary<string, object>

CalculatePaginationInfo()

Recomputes TotalPages, PaginationStart, and PaginationEnd from the current filtered set.

protected void CalculatePaginationInfo()

ChangePage(int)

Navigates to the given 1-based page and raises OnPageChange.

protected Task ChangePage(int page)

Parameters

page int

Returns

Task

ClearFilter()

Clears the global filter text and resets pagination.

protected void ClearFilter()

ClearFilterClicked()

Toolbar click handler that delegates to ClearFilter().

protected Task ClearFilterClicked()

Returns

Task

ClearSelection()

Clears every selected row and raises SelectedItemsChanged.

protected Task ClearSelection()

Returns

Task

ClearSelectionClicked()

Toolbar click handler that delegates to ClearSelection().

protected Task ClearSelectionClicked()

Returns

Task

Dispose()

Cancels and disposes the pending data-source load. Derived components that need their own teardown should override Dispose(bool) and chain base.Dispose(disposing).

public void Dispose()

Dispose(bool)

Disposal hook for derived components. The base implementation cancels and disposes the in-flight DataSource load token.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true when called from Dispose(); false from a finaliser.

EndColumnResize(PointerEventArgs)

Pointerup / pointercancel handler that ends the drag. Triggers a persistence save so the resized width survives across reloads when PersistenceKey is configured.

protected void EndColumnResize(PointerEventArgs e)

Parameters

e PointerEventArgs

Filter(string)

Applies a free-text filter and resets pagination to page 1.

public void Filter(string filterText)

Parameters

filterText string

FormatValue(object?, string?)

Formats a cell value using format when supported, falling back to ToString().

protected static string FormatValue(object? value, string? format)

Parameters

value object
format string

Returns

string

GetAggregateLabel(AggregateFunction)

Returns the localized lower-case label for an aggregate function (e.g. "sum", "average").

protected string GetAggregateLabel(AggregateFunction function)

Parameters

function AggregateFunction

Returns

string

GetAlignClass(ColumnAlign, string)

Returns the BEM alignment modifier class for the given ColumnAlign.

protected static string GetAlignClass(ColumnAlign align, string prefix)

Parameters

align ColumnAlign
prefix string

Returns

string

GetAriaSort(DataColumnRegistration<TItem>)

Returns the aria-sort value for a header cell, or null when the column is not currently sorted.

protected string? GetAriaSort(DataColumnRegistration<TItem> col)

Parameters

col DataColumnRegistration<TItem>

Returns

string

GetItemPatternStyle(int)

Per-item inline style for row patterns that cannot be expressed purely in CSS.

protected string? GetItemPatternStyle(int index)

Parameters

index int

Returns

string

GetOperatorsFor(ColumnFilterMode)

Returns the operator labels relevant to the column's ColumnFilterMode. Drives the operator <select> options rendered next to the filter input.

protected static IEnumerable<ColumnFilterOperator> GetOperatorsFor(ColumnFilterMode mode)

Parameters

mode ColumnFilterMode

Returns

IEnumerable<ColumnFilterOperator>

GetSelectedItems()

Returns the set of currently selected items.

public IReadOnlySet<TItem> GetSelectedItems()

Returns

IReadOnlySet<TItem>

GetVisiblePages()

Returns the windowed range of page numbers to render in the pager.

protected IEnumerable<int> GetVisiblePages()

Returns

IEnumerable<int>

GoToPage(int)

Navigates to the given 1-based page index. Out-of-range values are ignored.

public void GoToPage(int page)

Parameters

page int

HandleColumnFilterInput(string, ChangeEventArgs)

Handler wired to the per-column filter input rendered in the data grid header when ShowColumnFilters is on. Updates ColumnFilters, resets pagination, and re-runs the filter pipeline.

protected Task HandleColumnFilterInput(string columnName, ChangeEventArgs e)

Parameters

columnName string
e ChangeEventArgs

Returns

Task

HandleColumnFilterInputText(string, string?)

String-valued adapter wired to the internal text / date input primitives' Microsoft.AspNetCore.Components.EventCallback<TValue> contract — converts the bare value into a Microsoft.AspNetCore.Components.ChangeEventArgs and delegates to HandleColumnFilterInput(string, ChangeEventArgs).

protected Task HandleColumnFilterInputText(string columnName, string? value)

Parameters

columnName string
value string

Returns

Task

HandleColumnFilterOperator(string, ChangeEventArgs)

Handler wired to the per-column operator <select> rendered in the header next to the filter input. Updates the operator on the existing entry and re-runs the pipeline; no-op when the column has no active text yet.

protected void HandleColumnFilterOperator(string columnName, ChangeEventArgs e)

Parameters

columnName string
e ChangeEventArgs

HandleColumnFilterOperatorString(string, string?)

String-valued adapter wired to the internal select primitive's Microsoft.AspNetCore.Components.EventCallback<TValue> contract — converts the bare value into a Microsoft.AspNetCore.Components.ChangeEventArgs and delegates to HandleColumnFilterOperator(string, ChangeEventArgs).

protected void HandleColumnFilterOperatorString(string columnName, string? value)

Parameters

columnName string
value string

HandleFilterChange(ChangeEventArgs)

Handler bound to the global filter input. Resets pagination and re-runs the pipeline.

protected Task HandleFilterChange(ChangeEventArgs e)

Parameters

e ChangeEventArgs

Returns

Task

HandleFilterInputChange(string?)

String-valued adapter wired to the internal text input primitive's Microsoft.AspNetCore.Components.EventCallback<TValue> contract.

protected Task HandleFilterInputChange(string? value)

Parameters

value string

Returns

Task

HandleHeaderDragEnd(DragEventArgs)

Dragend handler clears the in-flight drag when the user releases outside any header.

protected void HandleHeaderDragEnd(DragEventArgs e)

Parameters

e DragEventArgs

HandleHeaderDragOver(string, DragEventArgs)

HTML5 dragover handler. Returning preventDefault via the matching @ondragover:preventDefault attribute is what makes a target eligible for drop; this handler is a no-op data hook so the grid can highlight the target.

protected void HandleHeaderDragOver(string columnName, DragEventArgs e)

Parameters

columnName string
e DragEventArgs

HandleHeaderDragStart(string, DragEventArgs)

HTML5 dragstart handler for a reorder-enabled column header. Captures the source column so the matching drop handler knows which header to move. No-op when Reorderable is off so the gesture is opt-in.

protected void HandleHeaderDragStart(string columnName, DragEventArgs e)

Parameters

columnName string
e DragEventArgs

HandleHeaderDrop(string, DragEventArgs)

Drop handler that translates the drag pair (source / target headers) into a MoveColumn(string, int, IEnumerable<string>) call by computing the index delta between the two columns in the current visible order.

protected void HandleHeaderDrop(string targetHeader, DragEventArgs e)

Parameters

targetHeader string
e DragEventArgs

HandleHeaderKeyDown(string, KeyboardEventArgs)

Header keydown handler invoked when Reorderable is on. Alt+ArrowLeft shifts the column one position toward the start, Alt+ArrowRight toward the end. Other keys fall through so existing keyboard handling (sort cycling via Enter) keeps working.

protected void HandleHeaderKeyDown(string columnName, KeyboardEventArgs e)

Parameters

columnName string
e KeyboardEventArgs

HandlePageSizeChange(ChangeEventArgs)

Page-size change handler. Resets pagination and raises OnPageChange.

protected Task HandlePageSizeChange(ChangeEventArgs e)

Parameters

e ChangeEventArgs

Returns

Task

HandlePageSizeSelectChange(string?)

String-valued adapter for the page-size <select>.

protected Task HandlePageSizeSelectChange(string? value)

Parameters

value string

Returns

Task

HandleRowClick(TItem)

Row click handler that combines selection (when active) and the user's OnRowClick.

protected Task HandleRowClick(TItem item)

Parameters

item TItem

Returns

Task

HandleRowKeyDown(KeyboardEventArgs, TItem)

Keyboard activation handler: Enter / Space behave like a row click.

protected Task HandleRowKeyDown(KeyboardEventArgs e, TItem item)

Parameters

e KeyboardEventArgs
item TItem

Returns

Task

HandleSelectAll(ChangeEventArgs)

Select-all checkbox handler: selects every visible row when checked, clears otherwise.

protected Task HandleSelectAll(ChangeEventArgs e)

Parameters

e ChangeEventArgs

Returns

Task

HandleSelectRow(TItem)

Selects the given row and raises SelectedItemsChanged.

protected Task HandleSelectRow(TItem item)

Parameters

item TItem

Returns

Task

HandleSort(DataColumnRegistration<TItem>)

Single-column sort handler (no append).

protected Task HandleSort(DataColumnRegistration<TItem> column)

Parameters

column DataColumnRegistration<TItem>

Returns

Task

HandleSort(DataColumnRegistration<TItem>, bool)

Toggle the sort state for the given column. append = true stacks the sort instead of replacing it (Shift+Click on the header). The notification fires with the new primary sort.

protected Task HandleSort(DataColumnRegistration<TItem> column, bool append)

Parameters

column DataColumnRegistration<TItem>
append bool

Returns

Task

HandleSortClick(DataColumnRegistration<TItem>, MouseEventArgs)

Wrapper invoked from sort buttons that exposes the click args so shiftKey can drive multi-column sort. Falls back to the single-column toggle when Shift is not pressed.

protected Task HandleSortClick(DataColumnRegistration<TItem> column, MouseEventArgs e)

Parameters

column DataColumnRegistration<TItem>
e MouseEventArgs

Returns

Task

HandleSortSelectChange(string?)

Handler bound to the sort-column <select> in mobile / compact toolbars.

protected Task HandleSortSelectChange(string? value)

Parameters

value string

Returns

Task

IsAllSelected()

True when every row on the current page is selected.

protected bool IsAllSelected()

Returns

bool

NotifySelectionChanged()

Raises SelectedItemsChanged with the latest selection snapshot.

protected Task NotifySelectionChanged()

Returns

Task

OnAfterRender(bool)

Method invoked after each time the component has rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any Microsoft.AspNetCore.Components.ElementReference fields will be populated by the time this runs.

This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.

protected override void OnAfterRender(bool firstRender)

Parameters

firstRender bool

Set to true if this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwise false.

Remarks

The Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) and Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool) lifecycle methods are useful for performing interop, or interacting with values received from @ref. Use the firstRender parameter to ensure that initialization work is only performed once.

OnInitialized()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

protected override void OnInitialized()

OnParametersSet()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

protected override void OnParametersSet()

OnResizePointerMove(PointerEventArgs)

Pointermove handler bound to the drag overlay; updates the column width on every frame the user moves the cursor while the resize handle is held.

protected void OnResizePointerMove(PointerEventArgs e)

Parameters

e PointerEventArgs

PersistState()

Fires the persistence pipeline. Wired into every state mutation handler — filter / sort / pagination / reorder / column filter — so the next reload restores the user's view. No-op when PersistenceKey is unset.

protected void PersistState()

ProcessData()

Re-runs filter/sort/pagination and refreshes ProcessedItems from the current state.

protected void ProcessData()

ProvideVirtualizedItemsAsync(ItemsProviderRequest)

ItemsProvider callback wired to Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize<TItem>.ItemsProvider when UsesItemsProvider is on. Translates the viewport-driven request (request) into a DataRequest and forwards to DataSource. The pagination footer is hidden in this mode — Virtualize owns slicing.

protected ValueTask<ItemsProviderResult<TItem>> ProvideVirtualizedItemsAsync(ItemsProviderRequest request)

Parameters

request ItemsProviderRequest

Range + cancellation token supplied by Virtualize.

Returns

ValueTask<ItemsProviderResult<TItem>>

Materialised slice plus total filtered row count for scroll-height math.

SortBy(string, SortDirection)

Sorts the collection by the given column header in the requested direction.

public void SortBy(string columnName, SortDirection direction)

Parameters

columnName string
direction SortDirection

StartColumnResize(DataColumnRegistration<TItem>, PointerEventArgs)

Pointerdown handler for the per-column resize handle. Seeds the drag state with the column's current effective width (state override > parameter > default 120).

protected void StartColumnResize(DataColumnRegistration<TItem> col, PointerEventArgs e)

Parameters

col DataColumnRegistration<TItem>
e PointerEventArgs

ToggleSortDirectionClicked()

Flips the active sort direction (asc ⇄ desc) for the current sort column.

protected Task ToggleSortDirectionClicked()

Returns

Task

UpdateLiveRegionMessage()

Rebuilds the localized live-region announcement (sort/filter/page summary) for screen readers.

protected void UpdateLiveRegionMessage()