Name |
Type |
Default value |
Description |
---|
Items |
IQueryable<TGridItem>? |
null |
A queryable source of data for the grid.
This could be in-memory data converted to queryable using the
System.Linq.Queryable.AsQueryable(System.Collections.IEnumerable) extension method,
or an EntityFramework DataSet or an IQueryable derived from it.
You should supply either Items or ItemsProvider, but not both. |
ItemsProvider |
BitDataGridItemsProvider<TGridItem>? |
null |
A callback that supplies data for the rid.
You should supply either Items or ItemsProvider, but not both. |
Class |
string? |
null |
An optional CSS class name. If given, this will be included in the class attribute of the rendered table. |
Theme |
string? |
default |
A theme name, with default value "default". This affects which styling rules match the table. |
ChildContent |
RenderFragment? |
null |
Defines the child components of this instance. For example, you may define columns by adding components derived from the BitDataGridColumnBase<TGridItem> |
Virtualize |
bool |
false |
If true, the grid will be rendered with virtualization. This is normally used in conjunction with
scrolling and causes the grid to fetch and render only the data around the current scroll viewport.
This can greatly improve the performance when scrolling through large data sets. |
ItemSize |
float |
50 |
This is applicable only when using Virtualize. It defines an expected height in pixels for
each row, allowing the virtualization mechanism to fetch the correct number of items to match the display
size and to ensure accurate scrolling. |
ResizableColumns |
bool |
false |
If true, renders draggable handles around the column headers, allowing the user to resize the columns
manually. Size changes are not persisted. |
ItemKey |
Func<TGridItem, object> |
x => x! |
Optionally defines a value for @key on each rendered row. Typically this should be used to specify a
unique identifier, such as a primary key value, for each data item.
This allows the grid to preserve the association between row elements and data items based on their
unique identifiers, even when the TGridItem instances are replaced by new copies (for example, after a new query against the underlying data store).
If not set, the @key will be the TGridItem instance itself. |
Pagination |
BitDataGridPaginationState? |
null |
Optionally links this BitDataGrid<TGridItem> instance with a BitDataGridPaginationState model,
causing the grid to fetch and render only the current page of data.
This is normally used in conjunction with a Paginator component or some other UI logic
that displays and updates the supplied BitDataGridPaginationState instance. |