Class DataRequest
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
Describes the slice of rows a data-collection component wants the
IDataCollectionDataSource<TItem> to materialise. The primary pair is
StartIndex + Count — they map naturally to
IQueryable.Skip(StartIndex).Take(Count) on server-side queries and to
Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderRequest
on the client side. Sources that prefer page-based semantics derive the page index
via Page.
public sealed record DataRequest
- Inheritance
-
objectDataRequest
Constructors
DataRequest(int, int?, string?, IReadOnlyList<SortDescriptor>, IReadOnlyDictionary<string, ColumnFilterEntry>)
Describes the slice of rows a data-collection component wants the
IDataCollectionDataSource<TItem> to materialise. The primary pair is
StartIndex + Count — they map naturally to
IQueryable.Skip(StartIndex).Take(Count) on server-side queries and to
Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderRequest
on the client side. Sources that prefer page-based semantics derive the page index
via Page.
public DataRequest(int StartIndex, int? Count, string? GlobalFilter, IReadOnlyList<SortDescriptor> Sorts, IReadOnlyDictionary<string, ColumnFilterEntry> ColumnFilters)
Parameters
StartIndexint0-based row offset within the filtered/sorted result set. Always
0when the consumer has not enabled pagination on the host component.Countint?Maximum number of rows to return starting at StartIndex. null means "no upper bound" — typically used when pagination is disabled and the source should return the full filtered/sorted set in a single call.
GlobalFilterstringFree-text search entered in the toolbar filter box. Empty / null when the consumer has not enabled global filtering or the user cleared the box.
SortsIReadOnlyList<SortDescriptor>Active sort descriptors in priority order (primary first). Empty when no sort is applied. Each entry carries the column header (resolved against
BOBDataColumn{TItem}.Header) and the direction.ColumnFiltersIReadOnlyDictionary<string, ColumnFilterEntry>Per-column filter entries keyed by column header (case-insensitive). Combined with GlobalFilter using AND semantics — a row must satisfy every entry. Empty when the consumer has not enabled per-column filtering.
Properties
ColumnFilters
Per-column filter entries keyed by column header (case-insensitive). Combined with GlobalFilter using AND semantics — a row must satisfy every entry. Empty when the consumer has not enabled per-column filtering.
public IReadOnlyDictionary<string, ColumnFilterEntry> ColumnFilters { get; init; }
Property Value
- IReadOnlyDictionary<string, ColumnFilterEntry>
Count
Maximum number of rows to return starting at StartIndex. null means "no upper bound" — typically used when pagination is disabled and the source should return the full filtered/sorted set in a single call.
public int? Count { get; init; }
Property Value
- int?
GlobalFilter
Free-text search entered in the toolbar filter box. Empty / null when the consumer has not enabled global filtering or the user cleared the box.
public string? GlobalFilter { get; init; }
Property Value
- string
Page
1-based page index derived from StartIndex and Count.
Useful for sources whose backend exposes page-based pagination (REST APIs with
?page=N, Cosmos DB continuation tokens, etc.). Returns 1 when
Count is null or zero (no pagination enabled).
public int Page { get; }
Property Value
- int
Sorts
Active sort descriptors in priority order (primary first). Empty when no sort is
applied. Each entry carries the column header (resolved against
BOBDataColumn{TItem}.Header) and the direction.
public IReadOnlyList<SortDescriptor> Sorts { get; init; }
Property Value
- IReadOnlyList<SortDescriptor>
StartIndex
0-based row offset within the filtered/sorted result set. Always 0 when the
consumer has not enabled pagination on the host component.
public int StartIndex { get; init; }
Property Value
- int