DataGrid
BitDataGrid is a robust way to display an information-rich collection of items, and allow people to sort, and filter the content. Use a data-grid when information density is critical.
Notes
To use this component, you need to install the `Bit.BlazorUI.Extras` nuget package, as described in the Optional steps of the Getting started page.Usage
Basic
Show code
Name
| Gold
| Silver
| Bronze
| Total
|
---|---|---|---|---|
Argentina | 0 | 1 | 2 | 3 |
Armenia | 0 | 2 | 2 | 4 |
Australia | 17 | 7 | 22 | 46 |
Austria | 1 | 1 | 5 | 7 |
Azerbaijan | 0 | 3 | 4 | 7 |
Bahamas | 2 | 0 | 0 | 2 |
Bahrain | 0 | 1 | 0 | 1 |
82 items
Customized
Show code
Name
| Flag | Gold
| Silver
| Bronze
| Action |
---|---|---|---|---|---|
Argentina | 0 | 1 | 2 | ||
Armenia | 0 | 2 | 2 | ||
Australia | 17 | 7 | 22 | ||
Austria | 1 | 1 | 5 | ||
Azerbaijan | 0 | 3 | 4 | ||
Bahamas | 2 | 0 | 0 | ||
Bahrain | 0 | 1 | 0 |
82 items
Virtualizing
Show code
EventId | State | City | Company | Status | Report Date
|
---|
OData
Show code
Id
| Name
| Price
|
---|
API
BitDataGrid parameters
Name |
Type |
Default value |
Description |
---|---|---|---|
BitDataGridColumnBase properties
BitDataGrid has two built-in column types, BitDataGridPropertyColumn and BitDataGridTemplateColumn. You can also create your own column types by subclassing ColumnBase The BitDataGridColumnBase type, which all column must derive from, offers some common parameters
Name |
Type |
Default value |
Description |
---|---|---|---|
BitDataGridPropertyColumn properties
It is for displaying a single value specified by the parameter Property. This column infers sorting rules automatically, and uses the property's name as its title if not otherwise set.
Name |
Type |
Default value |
Description |
---|---|---|---|
BitDataGridTemplateColumn properties
It uses arbitrary Razor fragments to supply contents for its cells. It can't infer the column's title or sort order automatically. also it's possible to add arbitrary Blazor components to your table cells. Remember that rendering many components, or many event handlers, can impact the performance of your grid. One way to mitigate this issue is by paginating or virtualizing your grid
Name |
Type |
Default value |
Description |
---|---|---|---|
BitDataGridAlign enum
Name |
Value |
Description |
---|---|---|
BitVisibility enum
Name |
Value |
Description |
---|---|---|
BitDir enum
Name |
Value |
Description |
---|---|---|
- On this page