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 & sorting

Bind a collection, declare columns, and you get sorting out of the box. Click a header to sort ascending → descending → unsorted. Hold Ctrl (or ⌘) and click additional headers for multi-column sorting.

The item type flows from the grid to its columns automatically (no per-column TItem needed), a column binds to its property with the strongly typed Property selector (the string-based Field parameter also remains available), and columns can be wrapped in an optional
Columns
element.

1
Vintage Gadget 212
Home
$171.75
131
3.9
2
Eco Notebook 554
Clothing
$382.16
130
3.1
3
Classic Gadget 181
Toys
$813.02
269
1.2
4
Vintage Blender 267
Electronics
$310.12
291
4.3
5
Vintage Jacket 234
Electronics
$55.50
390
3.5
6
Smart Drone 229
Electronics
$603.51
257
1.2
7
Eco Widget 428
Books
$72.97
359
1.3
8
Pro Blender 549
Electronics
$825.55
6
1.0
9
Deluxe Mug 514
Clothing
$615.44
22
2.5
10
Mini Jacket 367
Grocery
$585.87
367
1.1
11
Vintage Gadget 192
Home
$334.92
388
1.6
12
Mini Mug 788
Toys
$712.80
144
3.2
13
Classic Mug 124
Books
$267.79
19
1.9
14
Compact Gadget 195
Clothing
$325.60
375
4.3
15
Deluxe Speaker 932
Sports
$281.65
272
3.5
16
Eco Widget 307
Grocery
$982.55
390
1.5
17
Mini Blender 740
Electronics
$597.20
195
4.5
18
Pro Blender 952
Sports
$132.04
53
1.0
19
Classic Drone 459
Electronics
$906.58
481
4.6
20
Mega Mug 839
Sports
$282.70
169
3.1
21
Mega Speaker 349
Books
$830.28
320
1.3
22
Modern Mug 947
Home
$886.86
484
1.6
23
Mini Backpack 199
Sports
$349.39
260
3.9
24
Mini Speaker 940
Electronics
$60.13
107
2.3
25
Deluxe Lamp 430
Home
$760.77
331
5.0
26
Eco Mug 633
Toys
$388.23
478
1.3
27
Compact Camera 900
Electronics
$300.37
290
1.1
28
Mega Mug 366
Grocery
$749.69
15
2.4
29
Mini Jacket 409
Books
$604.08
321
3.4
30
Premium Camera 361
Grocery
$352.80
0
3.3
31
Mega Gadget 949
Books
$654.24
99
3.6
32
Mega Lamp 485
Books
$787.62
277
3.2
33
Compact Backpack 302
Clothing
$540.00
406
3.8
34
Pro Mug 551
Grocery
$45.94
206
2.7
35
Ultra Mug 514
Clothing
$484.40
357
2.7
36
Pro Camera 944
Home
$211.34
473
4.5
37
Mini Notebook 156
Electronics
$900.67
312
4.7
38
Premium Jacket 198
Electronics
$651.34
10
1.9
39
Classic Drone 215
Sports
$290.56
272
1.2
40
Mini Sneaker 570
Sports
$897.23
338
4.6
41
Modern Camera 946
Sports
$661.07
44
4.2
42
Vintage Mug 824
Sports
$444.42
453
1.8
43
Mini Mug 925
Electronics
$843.33
173
4.4
44
Premium Camera 560
Grocery
$35.33
277
3.6
45
Vintage Gadget 237
Home
$383.48
282
4.9
46
Pro Drone 577
Electronics
$285.56
438
4.7
47
Eco Jacket 846
Grocery
$59.26
414
2.8
48
Smart Camera 226
Toys
$612.62
229
4.1
49
Classic Gadget 202
Electronics
$494.25
256
2.4
50
Mega Sneaker 417
Sports
$955.45
169
2.1

Filtering & paging

A quick-filter row sits under the header; the pager controls page size and navigation. Typed filters are used for numeric, date, boolean and enum columns (like Price, Stock and Category), while text columns (like Name and Supplier) use case-insensitive text filtering.

This example binds columns with the string-based
Field
parameter - useful when column definitions come from configuration - instead of the strongly typed Property selector used elsewhere.

1
Vintage Gadget 212
Home
Wayne Enterprises
$171.75
131
2
Eco Notebook 554
Clothing
Soylent
$382.16
130
3
Classic Gadget 181
Toys
Wonka Inc
$813.02
269
4
Vintage Blender 267
Electronics
Wayne Enterprises
$310.12
291
5
Vintage Jacket 234
Electronics
Wayne Enterprises
$55.50
390
6
Smart Drone 229
Electronics
Stark Industries
$603.51
257
7
Eco Widget 428
Books
Wayne Enterprises
$72.97
359
8
Pro Blender 549
Electronics
Acme Corp
$825.55
6
9
Deluxe Mug 514
Clothing
Wayne Enterprises
$615.44
22
10
Mini Jacket 367
Grocery
Initech
$585.87
367
1–10 of 200
Page 1 of 20

Selection

Single or multiple selection with a select-all header checkbox and two-way binding.

0 selected

1
Vintage Gadget 212
Home
$171.75
2
Eco Notebook 554
Clothing
$382.16
3
Classic Gadget 181
Toys
$813.02
4
Vintage Blender 267
Electronics
$310.12
5
Vintage Jacket 234
Electronics
$55.50
6
Smart Drone 229
Electronics
$603.51
7
Eco Widget 428
Books
$72.97
8
Pro Blender 549
Electronics
$825.55
9
Deluxe Mug 514
Clothing
$615.44
10
Mini Jacket 367
Grocery
$585.87
1–10 of 60
Page 1 of 6

Inline editing

Add, edit, save, cancel and delete rows with type-aware editors (text, number, checkbox, date, enum). Use EditTemplate on a column to supply your own editor.

Actions
1
Vintage Gadget 212
Home
$171.75
131
3.9
2023-01-19
False
2
Eco Notebook 554
Clothing
$382.16
130
3.1
2019-07-18
True
3
Classic Gadget 181
Toys
$813.02
269
1.2
2023-03-12
False
4
Vintage Blender 267
Electronics
$310.12
291
4.3
2021-01-25
True
5
Vintage Jacket 234
Electronics
$55.50
390
3.5
2022-08-20
True
6
Smart Drone 229
Electronics
$603.51
257
1.2
2020-02-18
False
7
Eco Widget 428
Books
$72.97
359
1.3
2023-12-08
False
8
Pro Blender 549
Electronics
$825.55
6
1.0
2020-06-02
True
9
Deluxe Mug 514
Clothing
$615.44
22
2.5
2021-08-11
True
10
Mini Jacket 367
Grocery
$585.87
367
1.1
2018-10-04
False
1–10 of 25
Page 1 of 3

Grouping & aggregates

Click the ⊞ button in a groupable column header to group by it (click again to ungroup). Each group is collapsible and shows its own aggregates; the footer shows grand totals. Group by both Category and Supplier to see multi-level grouping. Beyond the built-in Aggregate types, AggregateBy computes a custom aggregate - here the Supplier column counts distinct suppliers per group and overall.

1
Vintage Gadget 212
Home
Wayne Enterprises
$171.75
131
3.9
2
Eco Notebook 554
Clothing
Soylent
$382.16
130
3.1
3
Classic Gadget 181
Toys
Wonka Inc
$813.02
269
1.2
4
Vintage Blender 267
Electronics
Wayne Enterprises
$310.12
291
4.3
5
Vintage Jacket 234
Electronics
Wayne Enterprises
$55.50
390
3.5
6
Smart Drone 229
Electronics
Stark Industries
$603.51
257
1.2
7
Eco Widget 428
Books
Wayne Enterprises
$72.97
359
1.3
8
Pro Blender 549
Electronics
Acme Corp
$825.55
6
1.0
9
Deluxe Mug 514
Clothing
Wayne Enterprises
$615.44
22
2.5
10
Mini Jacket 367
Grocery
Initech
$585.87
367
1.1
11
Vintage Gadget 192
Home
Soylent
$334.92
388
1.6
12
Mini Mug 788
Toys
Acme Corp
$712.80
144
3.2
13
Classic Mug 124
Books
Acme Corp
$267.79
19
1.9
14
Compact Gadget 195
Clothing
Wayne Enterprises
$325.60
375
4.3
15
Deluxe Speaker 932
Sports
Initech
$281.65
272
3.5
16
Eco Widget 307
Grocery
Initech
$982.55
390
1.5
17
Mini Blender 740
Electronics
Wonka Inc
$597.20
195
4.5
18
Pro Blender 952
Sports
Stark Industries
$132.04
53
1.0
19
Classic Drone 459
Electronics
Soylent
$906.58
481
4.6
20
Mega Mug 839
Sports
Wonka Inc
$282.70
169
3.1
21
Mega Speaker 349
Books
Wonka Inc
$830.28
320
1.3
22
Modern Mug 947
Home
Stark Industries
$886.86
484
1.6
23
Mini Backpack 199
Sports
Wayne Enterprises
$349.39
260
3.9
24
Mini Speaker 940
Electronics
Initech
$60.13
107
2.3
25
Deluxe Lamp 430
Home
Initech
$760.77
331
5.0
26
Eco Mug 633
Toys
Initech
$388.23
478
1.3
27
Compact Camera 900
Electronics
Stark Industries
$300.37
290
1.1
28
Mega Mug 366
Grocery
Stark Industries
$749.69
15
2.4
29
Mini Jacket 409
Books
Acme Corp
$604.08
321
3.4
30
Premium Camera 361
Grocery
Globex
$352.80
0
3.3
31
Mega Gadget 949
Books
Initech
$654.24
99
3.6
32
Mega Lamp 485
Books
Stark Industries
$787.62
277
3.2
33
Compact Backpack 302
Clothing
Wayne Enterprises
$540.00
406
3.8
34
Pro Mug 551
Grocery
Umbrella
$45.94
206
2.7
35
Ultra Mug 514
Clothing
Wayne Enterprises
$484.40
357
2.7
36
Pro Camera 944
Home
Wayne Enterprises
$211.34
473
4.5
37
Mini Notebook 156
Electronics
Umbrella
$900.67
312
4.7
38
Premium Jacket 198
Electronics
Wayne Enterprises
$651.34
10
1.9
39
Classic Drone 215
Sports
Acme Corp
$290.56
272
1.2
40
Mini Sneaker 570
Sports
Wayne Enterprises
$897.23
338
4.6
41
Modern Camera 946
Sports
Globex
$661.07
44
4.2
42
Vintage Mug 824
Sports
Initech
$444.42
453
1.8
43
Mini Mug 925
Electronics
Wonka Inc
$843.33
173
4.4
44
Premium Camera 560
Grocery
Globex
$35.33
277
3.6
45
Vintage Gadget 237
Home
Wonka Inc
$383.48
282
4.9
46
Pro Drone 577
Electronics
Initech
$285.56
438
4.7
47
Eco Jacket 846
Grocery
Wonka Inc
$59.26
414
2.8
48
Smart Camera 226
Toys
Initech
$612.62
229
4.1
49
Classic Gadget 202
Electronics
Globex
$494.25
256
2.4
50
Mega Sneaker 417
Sports
Soylent
$955.45
169
2.1
51
Premium Gadget 932
Clothing
Wayne Enterprises
$741.93
301
2.9
52
Premium Lamp 283
Toys
Soylent
$943.60
49
2.2
53
Pro Mug 237
Toys
Initech
$264.98
237
3.1
54
Eco Lamp 139
Electronics
Wonka Inc
$175.86
112
1.9
55
Ultra Lamp 134
Grocery
Wayne Enterprises
$47.06
77
3.3
56
Ultra Blender 911
Grocery
Initech
$80.83
62
5.0
57
Ultra Gadget 323
Books
Stark Industries
$647.39
313
2.7
58
Deluxe Blender 420
Home
Acme Corp
$506.54
17
4.8
59
Deluxe Camera 513
Sports
Acme Corp
$234.18
305
3.3
60
Eco Mug 642
Electronics
Umbrella
$809.15
442
1.8
61
Vintage Lamp 246
Books
Acme Corp
$971.43
238
1.8
62
Eco Backpack 738
Electronics
Acme Corp
$366.59
112
3.8
63
Ultra Notebook 129
Home
Soylent
$488.57
483
4.9
64
Deluxe Widget 171
Books
Wayne Enterprises
$384.18
206
3.8
65
Classic Gadget 833
Electronics
Soylent
$866.59
268
1.8
66
Eco Backpack 963
Books
Acme Corp
$371.05
236
2.8
67
Mini Mug 765
Sports
Wonka Inc
$200.57
57
3.5
68
Mini Jacket 661
Books
Wonka Inc
$632.20
439
2.7
69
Modern Jacket 576
Electronics
Wonka Inc
$429.20
49
1.4
70
Compact Mug 696
Sports
Wayne Enterprises
$244.82
228
2.7
71
Compact Backpack 959
Sports
Umbrella
$57.23
410
1.5
72
Ultra Lamp 199
Toys
Acme Corp
$249.92
68
2.7
73
Ultra Backpack 762
Sports
Globex
$991.34
272
3.8
74
Pro Jacket 295
Sports
Soylent
$37.91
45
2.7
75
Compact Notebook 426
Clothing
Acme Corp
$869.12
262
4.5
76
Ultra Sneaker 789
Toys
Soylent
$743.04
101
4.7
77
Premium Notebook 878
Clothing
Globex
$39.85
338
1.9
78
Vintage Drone 655
Toys
Umbrella
$121.29
349
2.4
79
Mega Backpack 316
Sports
Wayne Enterprises
$138.33
341
3.4
80
Premium Speaker 971
Home
Globex
$496.89
335
2.8

Templates & detail rows

Customize any cell, header or footer, and expand rows to reveal detail content. Click the ▸ toggle on the left of a row to expand its detail panel. A template-only column (no Field) is not sortable by default - give it a SortBy key selector to sort it, like the computed Value column here.

Vintage Gadget 212
Home
$171.75
131 in stock
$22,499
Eco Notebook 554
Clothing
$382.16
130 in stock
$49,681
Classic Gadget 181
Toys
$813.02
269 in stock
$218,702
Vintage Blender 267
Electronics
$310.12
291 in stock
$90,245
Vintage Jacket 234
Electronics
$55.50
390 in stock
$21,645
Smart Drone 229
Electronics
$603.51
257 in stock
$155,102
Eco Widget 428
Books
$72.97
359 in stock
$26,196
Pro Blender 549
Electronics
$825.55
6 in stock
$4,953
Deluxe Mug 514
Clothing
$615.44
22 in stock
$13,540
Mini Jacket 367
Grocery
$585.87
367 in stock
$215,014
Vintage Gadget 192
Home
$334.92
388 in stock
$129,949
Mini Mug 788
Toys
$712.80
144 in stock
$102,643
Classic Mug 124
Books
$267.79
19 in stock
$5,088
Compact Gadget 195
Clothing
$325.60
375 in stock
$122,100
Deluxe Speaker 932
Sports
$281.65
272 in stock
$76,609
Eco Widget 307
Grocery
$982.55
390 in stock
$383,195
Mini Blender 740
Electronics
$597.20
195 in stock
$116,454
Pro Blender 952
Sports
$132.04
53 in stock
$6,998
Classic Drone 459
Electronics
$906.58
481 in stock
$436,065
Mega Mug 839
Sports
$282.70
169 in stock
$47,776
Mega Speaker 349
Books
$830.28
320 in stock
$265,690
Modern Mug 947
Home
$886.86
484 in stock
$429,240
Mini Backpack 199
Sports
$349.39
260 in stock
$90,841
Mini Speaker 940
Electronics
$60.13
107 in stock
$6,434
Deluxe Lamp 430
Home
$760.77
331 in stock
$251,815
Eco Mug 633
Toys
$388.23
478 in stock
$185,574
Compact Camera 900
Electronics
$300.37
290 in stock
$87,107
Mega Mug 366
Grocery
$749.69
15 in stock
$11,245
Mini Jacket 409
Books
$604.08
321 in stock
$193,910
Premium Camera 361
Grocery
$352.80
Out of stock
$0

Resize, reorder & freeze columns

Drag column edges to resize, drag headers to reorder, and pin columns in place. The ID and Name columns are frozen, staying visible while you scroll horizontally.

1
Vintage Gadget 212
Home
Wayne Enterprises
$171.75
131
3.9
2023-01-19
2
Eco Notebook 554
Clothing
Soylent
$382.16
130
3.1
2019-07-18
3
Classic Gadget 181
Toys
Wonka Inc
$813.02
269
1.2
2023-03-12
4
Vintage Blender 267
Electronics
Wayne Enterprises
$310.12
291
4.3
2021-01-25
5
Vintage Jacket 234
Electronics
Wayne Enterprises
$55.50
390
3.5
2022-08-20
6
Smart Drone 229
Electronics
Stark Industries
$603.51
257
1.2
2020-02-18
7
Eco Widget 428
Books
Wayne Enterprises
$72.97
359
1.3
2023-12-08
8
Pro Blender 549
Electronics
Acme Corp
$825.55
6
1.0
2020-06-02
9
Deluxe Mug 514
Clothing
Wayne Enterprises
$615.44
22
2.5
2021-08-11
10
Mini Jacket 367
Grocery
Initech
$585.87
367
1.1
2018-10-04
11
Vintage Gadget 192
Home
Soylent
$334.92
388
1.6
2022-10-27
12
Mini Mug 788
Toys
Acme Corp
$712.80
144
3.2
2020-06-09
13
Classic Mug 124
Books
Acme Corp
$267.79
19
1.9
2021-09-09
14
Compact Gadget 195
Clothing
Wayne Enterprises
$325.60
375
4.3
2023-10-09
15
Deluxe Speaker 932
Sports
Initech
$281.65
272
3.5
2022-12-13
16
Eco Widget 307
Grocery
Initech
$982.55
390
1.5
2022-12-24
17
Mini Blender 740
Electronics
Wonka Inc
$597.20
195
4.5
2022-02-04
18
Pro Blender 952
Sports
Stark Industries
$132.04
53
1.0
2018-11-08
19
Classic Drone 459
Electronics
Soylent
$906.58
481
4.6
2022-03-05
20
Mega Mug 839
Sports
Wonka Inc
$282.70
169
3.1
2022-08-25
21
Mega Speaker 349
Books
Wonka Inc
$830.28
320
1.3
2019-08-05
22
Modern Mug 947
Home
Stark Industries
$886.86
484
1.6
2022-11-05
23
Mini Backpack 199
Sports
Wayne Enterprises
$349.39
260
3.9
2021-02-06
24
Mini Speaker 940
Electronics
Initech
$60.13
107
2.3
2022-05-29
25
Deluxe Lamp 430
Home
Initech
$760.77
331
5.0
2019-04-24
26
Eco Mug 633
Toys
Initech
$388.23
478
1.3
2019-03-07
27
Compact Camera 900
Electronics
Stark Industries
$300.37
290
1.1
2021-10-02
28
Mega Mug 366
Grocery
Stark Industries
$749.69
15
2.4
2023-10-08
29
Mini Jacket 409
Books
Acme Corp
$604.08
321
3.4
2020-05-11
30
Premium Camera 361
Grocery
Globex
$352.80
0
3.3
2023-02-25
31
Mega Gadget 949
Books
Initech
$654.24
99
3.6
2019-04-16
32
Mega Lamp 485
Books
Stark Industries
$787.62
277
3.2
2021-10-01
33
Compact Backpack 302
Clothing
Wayne Enterprises
$540.00
406
3.8
2020-10-10
34
Pro Mug 551
Grocery
Umbrella
$45.94
206
2.7
2020-12-02
35
Ultra Mug 514
Clothing
Wayne Enterprises
$484.40
357
2.7
2022-12-21
36
Pro Camera 944
Home
Wayne Enterprises
$211.34
473
4.5
2020-07-01
37
Mini Notebook 156
Electronics
Umbrella
$900.67
312
4.7
2023-02-28
38
Premium Jacket 198
Electronics
Wayne Enterprises
$651.34
10
1.9
2019-06-22
39
Classic Drone 215
Sports
Acme Corp
$290.56
272
1.2
2020-06-08
40
Mini Sneaker 570
Sports
Wayne Enterprises
$897.23
338
4.6
2021-10-15

Column header groups

Set Group on consecutive columns to render them under a single spanning header cell.

Identity
Commercials
Quality
1
Vintage Gadget 212
Home
$171.75
131
3.9
Wayne Enterprises
2
Eco Notebook 554
Clothing
$382.16
130
3.1
Soylent
3
Classic Gadget 181
Toys
$813.02
269
1.2
Wonka Inc
4
Vintage Blender 267
Electronics
$310.12
291
4.3
Wayne Enterprises
5
Vintage Jacket 234
Electronics
$55.50
390
3.5
Wayne Enterprises
6
Smart Drone 229
Electronics
$603.51
257
1.2
Stark Industries
7
Eco Widget 428
Books
$72.97
359
1.3
Wayne Enterprises
8
Pro Blender 549
Electronics
$825.55
6
1.0
Acme Corp
9
Deluxe Mug 514
Clothing
$615.44
22
2.5
Wayne Enterprises
10
Mini Jacket 367
Grocery
$585.87
367
1.1
Initech
11
Vintage Gadget 192
Home
$334.92
388
1.6
Soylent
12
Mini Mug 788
Toys
$712.80
144
3.2
Acme Corp
13
Classic Mug 124
Books
$267.79
19
1.9
Acme Corp
14
Compact Gadget 195
Clothing
$325.60
375
4.3
Wayne Enterprises
15
Deluxe Speaker 932
Sports
$281.65
272
3.5
Initech
16
Eco Widget 307
Grocery
$982.55
390
1.5
Initech
17
Mini Blender 740
Electronics
$597.20
195
4.5
Wonka Inc
18
Pro Blender 952
Sports
$132.04
53
1.0
Stark Industries
19
Classic Drone 459
Electronics
$906.58
481
4.6
Soylent
20
Mega Mug 839
Sports
$282.70
169
3.1
Wonka Inc
21
Mega Speaker 349
Books
$830.28
320
1.3
Wonka Inc
22
Modern Mug 947
Home
$886.86
484
1.6
Stark Industries
23
Mini Backpack 199
Sports
$349.39
260
3.9
Wayne Enterprises
24
Mini Speaker 940
Electronics
$60.13
107
2.3
Initech
25
Deluxe Lamp 430
Home
$760.77
331
5.0
Initech
26
Eco Mug 633
Toys
$388.23
478
1.3
Initech
27
Compact Camera 900
Electronics
$300.37
290
1.1
Stark Industries
28
Mega Mug 366
Grocery
$749.69
15
2.4
Stark Industries
29
Mini Jacket 409
Books
$604.08
321
3.4
Acme Corp
30
Premium Camera 361
Grocery
$352.80
0
3.3
Globex
31
Mega Gadget 949
Books
$654.24
99
3.6
Initech
32
Mega Lamp 485
Books
$787.62
277
3.2
Stark Industries
33
Compact Backpack 302
Clothing
$540.00
406
3.8
Wayne Enterprises
34
Pro Mug 551
Grocery
$45.94
206
2.7
Umbrella
35
Ultra Mug 514
Clothing
$484.40
357
2.7
Wayne Enterprises
36
Pro Camera 944
Home
$211.34
473
4.5
Wayne Enterprises
37
Mini Notebook 156
Electronics
$900.67
312
4.7
Umbrella
38
Premium Jacket 198
Electronics
$651.34
10
1.9
Wayne Enterprises
39
Classic Drone 215
Sports
$290.56
272
1.2
Acme Corp
40
Mini Sneaker 570
Sports
$897.23
338
4.6
Wayne Enterprises

Column spanning

Provide a ColSpan function on a column to let a single cell span several columns based on its row. Discontinued rows span the Name cell over Category; premium rows span Price over Stock.

1
Vintage Gadget 212
Home
$171.75
131
2
⚠ Eco Notebook 554 - discontinued (no further details)
$382.16
130
3
Classic Gadget 181
Toys
★ Premium: $813.02 · 269 in stock
4
⚠ Vintage Blender 267 - discontinued (no further details)
$310.12
291
5
⚠ Vintage Jacket 234 - discontinued (no further details)
$55.50
390
6
Smart Drone 229
Electronics
$603.51
257
7
Eco Widget 428
Books
$72.97
359
8
⚠ Pro Blender 549 - discontinued (no further details)
★ Premium: $825.55 · 6 in stock
9
⚠ Deluxe Mug 514 - discontinued (no further details)
$615.44
22
10
Mini Jacket 367
Grocery
$585.87
367
11
⚠ Vintage Gadget 192 - discontinued (no further details)
$334.92
388
12
Mini Mug 788
Toys
$712.80
144
13
Classic Mug 124
Books
$267.79
19
14
⚠ Compact Gadget 195 - discontinued (no further details)
$325.60
375
15
Deluxe Speaker 932
Sports
$281.65
272
16
Eco Widget 307
Grocery
★ Premium: $982.55 · 390 in stock
17
Mini Blender 740
Electronics
$597.20
195
18
⚠ Pro Blender 952 - discontinued (no further details)
$132.04
53
19
⚠ Classic Drone 459 - discontinued (no further details)
★ Premium: $906.58 · 481 in stock
20
Mega Mug 839
Sports
$282.70
169
21
Mega Speaker 349
Books
★ Premium: $830.28 · 320 in stock
22
Modern Mug 947
Home
★ Premium: $886.86 · 484 in stock
23
Mini Backpack 199
Sports
$349.39
260
24
⚠ Mini Speaker 940 - discontinued (no further details)
$60.13
107
25
Deluxe Lamp 430
Home
$760.77
331
26
Eco Mug 633
Toys
$388.23
478
27
Compact Camera 900
Electronics
$300.37
290
28
Mega Mug 366
Grocery
$749.69
15
29
Mini Jacket 409
Books
$604.08
321
30
Premium Camera 361
Grocery
$352.80
0
31
Mega Gadget 949
Books
$654.24
99
32
Mega Lamp 485
Books
$787.62
277
33
Compact Backpack 302
Clothing
$540.00
406
34
⚠ Pro Mug 551 - discontinued (no further details)
$45.94
206
35
⚠ Ultra Mug 514 - discontinued (no further details)
$484.40
357
36
Pro Camera 944
Home
$211.34
473
37
Mini Notebook 156
Electronics
★ Premium: $900.67 · 312 in stock
38
Premium Jacket 198
Electronics
$651.34
10
39
⚠ Classic Drone 215 - discontinued (no further details)
$290.56
272
40
Mini Sneaker 570
Sports
★ Premium: $897.23 · 338 in stock

Virtualization

Render very large datasets smoothly - only visible rows hit the DOM. Virtualization requires a fixed Height and RowHeight.

10,000 rows

Server-side data

Set the OnRead callback to take over sorting/filtering/paging (e.g. against a database). This example simulates a backend with a small delay.

1
Vintage Gadget 212
Home
Wayne Enterprises
$171.75
131
2
Eco Notebook 554
Clothing
Soylent
$382.16
130
3
Classic Gadget 181
Toys
Wonka Inc
$813.02
269
4
Vintage Blender 267
Electronics
Wayne Enterprises
$310.12
291
5
Vintage Jacket 234
Electronics
Wayne Enterprises
$55.50
390
6
Smart Drone 229
Electronics
Stark Industries
$603.51
257
7
Eco Widget 428
Books
Wayne Enterprises
$72.97
359
8
Pro Blender 549
Electronics
Acme Corp
$825.55
6
9
Deluxe Mug 514
Clothing
Wayne Enterprises
$615.44
22
10
Mini Jacket 367
Grocery
Initech
$585.87
367
1–10 of 523
Page 1 of 53

Last request → skip 0, take 10, sorts: 0, filters: 0, total: 523

Infinite scrolling

Set OnLoadMore instead of binding Items. The grid appends the next batch automatically as the user scrolls toward the end - with no total count or paging UI. A fixed Height is required. CSV/Excel exports issue a single request with Take = null ("all rows"), so the handler should honor a null Take.

1
Vintage Gadget 212
Home
Wayne Enterprises
$171.75
131
3.9
2
Eco Notebook 554
Clothing
Soylent
$382.16
130
3.1
3
Classic Gadget 181
Toys
Wonka Inc
$813.02
269
1.2
4
Vintage Blender 267
Electronics
Wayne Enterprises
$310.12
291
4.3
5
Vintage Jacket 234
Electronics
Wayne Enterprises
$55.50
390
3.5
6
Smart Drone 229
Electronics
Stark Industries
$603.51
257
1.2
7
Eco Widget 428
Books
Wayne Enterprises
$72.97
359
1.3
8
Pro Blender 549
Electronics
Acme Corp
$825.55
6
1.0
9
Deluxe Mug 514
Clothing
Wayne Enterprises
$615.44
22
2.5
10
Mini Jacket 367
Grocery
Initech
$585.87
367
1.1
11
Vintage Gadget 192
Home
Soylent
$334.92
388
1.6
12
Mini Mug 788
Toys
Acme Corp
$712.80
144
3.2
13
Classic Mug 124
Books
Acme Corp
$267.79
19
1.9
14
Compact Gadget 195
Clothing
Wayne Enterprises
$325.60
375
4.3
15
Deluxe Speaker 932
Sports
Initech
$281.65
272
3.5
16
Eco Widget 307
Grocery
Initech
$982.55
390
1.5
17
Mini Blender 740
Electronics
Wonka Inc
$597.20
195
4.5
18
Pro Blender 952
Sports
Stark Industries
$132.04
53
1.0
19
Classic Drone 459
Electronics
Soylent
$906.58
481
4.6
20
Mega Mug 839
Sports
Wonka Inc
$282.70
169
3.1
21
Mega Speaker 349
Books
Wonka Inc
$830.28
320
1.3
22
Modern Mug 947
Home
Stark Industries
$886.86
484
1.6
23
Mini Backpack 199
Sports
Wayne Enterprises
$349.39
260
3.9
24
Mini Speaker 940
Electronics
Initech
$60.13
107
2.3
25
Deluxe Lamp 430
Home
Initech
$760.77
331
5.0
26
Eco Mug 633
Toys
Initech
$388.23
478
1.3
27
Compact Camera 900
Electronics
Stark Industries
$300.37
290
1.1
28
Mega Mug 366
Grocery
Stark Industries
$749.69
15
2.4
29
Mini Jacket 409
Books
Acme Corp
$604.08
321
3.4
30
Premium Camera 361
Grocery
Globex
$352.80
0
3.3
31
Mega Gadget 949
Books
Initech
$654.24
99
3.6
32
Mega Lamp 485
Books
Stark Industries
$787.62
277
3.2
33
Compact Backpack 302
Clothing
Wayne Enterprises
$540.00
406
3.8
34
Pro Mug 551
Grocery
Umbrella
$45.94
206
2.7
35
Ultra Mug 514
Clothing
Wayne Enterprises
$484.40
357
2.7
36
Pro Camera 944
Home
Wayne Enterprises
$211.34
473
4.5
37
Mini Notebook 156
Electronics
Umbrella
$900.67
312
4.7
38
Premium Jacket 198
Electronics
Wayne Enterprises
$651.34
10
1.9
39
Classic Drone 215
Sports
Acme Corp
$290.56
272
1.2
40
Mini Sneaker 570
Sports
Wayne Enterprises
$897.23
338
4.6

Batch #1 → loaded rows 1–40 (40 rows)

Tree view (hierarchical rows)

Set the ChildrenSelector parameter to a function that returns each item's direct children. The grid then treats Items as the root nodes and renders expand/collapse toggles with indentation.


src
Folder
81,710
2025-01-17
BitDataGrid
Folder
79,470
2025-01-11
BitDataGrid.razor
File
24,500
2025-01-02
BitDataGrid.razor.cs
File
41,200
2025-01-03
Models
Folder
1,470
2025-01-07
BitDataGridColumnAlign.cs
File
320
2025-01-04
BitDataGridSortDescriptor.cs
File
540
2025-01-05
BitDataGridFilterOperator.cs
File
610
2025-01-06
Infrastructure
Folder
12,300
2025-01-10
BitDataGridDataProcessor.cs
File
8,900
2025-01-08
BitDataGridPropertyAccessor.cs
File
3,400
2025-01-09
BitDataGrid.Demo
Folder
2,240
2025-01-16
Program.cs
File
1,200
2025-01-12
Components
Folder
1,040
2025-01-15
App.razor
File
760
2025-01-13
Routes.razor
File
280
2025-01-14
docs
Folder
8,500
2025-01-20
README.md
File
6,400
2025-01-18
CHANGELOG.md
File
2,100
2025-01-19
assets
Folder
18,250
2025-01-24
logo.svg
File
4,800
2025-01-21
styles.css
File
12,300
2025-01-22
favicon.ico
File
1,150
2025-01-23
LICENSE
File
1,070
2025-01-25
.gitignore
File
410
2025-01-26

Master detail

The DetailTemplate can render anything - including another BitDataGrid. Each supplier expands to show a nested, sortable grid of the products it provides.

Acme Corp
30
6,616
$429.75
Globex
30
7,956
$437.39
Initech
29
7,437
$506.15
Soylent
31
7,153
$572.64
Stark Industries
24
4,940
$480.67
Umbrella
24
6,828
$457.84
Wayne Enterprises
42
10,224
$453.40
Wonka Inc
30
7,128
$520.82

Row reordering

Set RowReorderable="true" to show a drag handle on each row. Grab the ⠿ handle and drop it onto another row. The grid reorders the bound list in place and raises OnRowReorder.

ID
Name
Category
Price
1
Vintage Gadget 212
Home
$171.75
2
Eco Notebook 554
Clothing
$382.16
3
Classic Gadget 181
Toys
$813.02
4
Vintage Blender 267
Electronics
$310.12
5
Vintage Jacket 234
Electronics
$55.50
6
Smart Drone 229
Electronics
$603.51
7
Eco Widget 428
Books
$72.97
8
Pro Blender 549
Electronics
$825.55
9
Deluxe Mug 514
Clothing
$615.44
10
Mini Jacket 367
Grocery
$585.87
11
Vintage Gadget 192
Home
$334.92
12
Mini Mug 788
Toys
$712.80

Cell events & context menu

The grid raises OnCellClick, OnCellDoubleClick and OnCellContextMenu with the row, column and the underlying mouse event. Here OnCellContextMenu opens a custom context menu at the pointer position (right-click any cell).

1
Vintage Gadget 212
Home
$171.75
2
Eco Notebook 554
Clothing
$382.16
3
Classic Gadget 181
Toys
$813.02
4
Vintage Blender 267
Electronics
$310.12
5
Vintage Jacket 234
Electronics
$55.50
6
Smart Drone 229
Electronics
$603.51
7
Eco Widget 428
Books
$72.97
8
Pro Blender 549
Electronics
$825.55
9
Deluxe Mug 514
Clothing
$615.44
10
Mini Jacket 367
Grocery
$585.87
11
Vintage Gadget 192
Home
$334.92
12
Mini Mug 788
Toys
$712.80
13
Classic Mug 124
Books
$267.79
14
Compact Gadget 195
Clothing
$325.60
15
Deluxe Speaker 932
Sports
$281.65
16
Eco Widget 307
Grocery
$982.55
17
Mini Blender 740
Electronics
$597.20
18
Pro Blender 952
Sports
$132.04
19
Classic Drone 459
Electronics
$906.58
20
Mega Mug 839
Sports
$282.70
21
Mega Speaker 349
Books
$830.28
22
Modern Mug 947
Home
$886.86
23
Mini Backpack 199
Sports
$349.39
24
Mini Speaker 940
Electronics
$60.13
25
Deluxe Lamp 430
Home
$760.77
26
Eco Mug 633
Toys
$388.23
27
Compact Camera 900
Electronics
$300.37
28
Mega Mug 366
Grocery
$749.69
29
Mini Jacket 409
Books
$604.08
30
Premium Camera 361
Grocery
$352.80
31
Mega Gadget 949
Books
$654.24
32
Mega Lamp 485
Books
$787.62
33
Compact Backpack 302
Clothing
$540.00
34
Pro Mug 551
Grocery
$45.94
35
Ultra Mug 514
Clothing
$484.40
36
Pro Camera 944
Home
$211.34
37
Mini Notebook 156
Electronics
$900.67
38
Premium Jacket 198
Electronics
$651.34
39
Classic Drone 215
Sports
$290.56
40
Mini Sneaker 570
Sports
$897.23

Click, double-click or right-click any cell.

Keyboard cell navigation

Set CellNavigation="true" to enable a roving tab stop. Use arrow keys, Home/End, Ctrl+Home/End, PageUp/PageDown to move, Enter/F2 to edit (Esc to cancel), and Delete to delete the focused row (requires Editable).

Actions
1
Vintage Gadget 212
Home
$171.75
131
3.9
2
Eco Notebook 554
Clothing
$382.16
130
3.1
3
Classic Gadget 181
Toys
$813.02
269
1.2
4
Vintage Blender 267
Electronics
$310.12
291
4.3
5
Vintage Jacket 234
Electronics
$55.50
390
3.5
6
Smart Drone 229
Electronics
$603.51
257
1.2
7
Eco Widget 428
Books
$72.97
359
1.3
8
Pro Blender 549
Electronics
$825.55
6
1.0
9
Deluxe Mug 514
Clothing
$615.44
22
2.5
10
Mini Jacket 367
Grocery
$585.87
367
1.1
11
Vintage Gadget 192
Home
$334.92
388
1.6
12
Mini Mug 788
Toys
$712.80
144
3.2
13
Classic Mug 124
Books
$267.79
19
1.9
14
Compact Gadget 195
Clothing
$325.60
375
4.3
15
Deluxe Speaker 932
Sports
$281.65
272
3.5
16
Eco Widget 307
Grocery
$982.55
390
1.5
17
Mini Blender 740
Electronics
$597.20
195
4.5
18
Pro Blender 952
Sports
$132.04
53
1.0
19
Classic Drone 459
Electronics
$906.58
481
4.6
20
Mega Mug 839
Sports
$282.70
169
3.1
21
Mega Speaker 349
Books
$830.28
320
1.3
22
Modern Mug 947
Home
$886.86
484
1.6
23
Mini Backpack 199
Sports
$349.39
260
3.9
24
Mini Speaker 940
Electronics
$60.13
107
2.3
25
Deluxe Lamp 430
Home
$760.77
331
5.0
26
Eco Mug 633
Toys
$388.23
478
1.3
27
Compact Camera 900
Electronics
$300.37
290
1.1
28
Mega Mug 366
Grocery
$749.69
15
2.4
29
Mini Jacket 409
Books
$604.08
321
3.4
30
Premium Camera 361
Grocery
$352.80
0
3.3
31
Mega Gadget 949
Books
$654.24
99
3.6
32
Mega Lamp 485
Books
$787.62
277
3.2
33
Compact Backpack 302
Clothing
$540.00
406
3.8
34
Pro Mug 551
Grocery
$45.94
206
2.7
35
Ultra Mug 514
Clothing
$484.40
357
2.7
36
Pro Camera 944
Home
$211.34
473
4.5
37
Mini Notebook 156
Electronics
$900.67
312
4.7
38
Premium Jacket 198
Electronics
$651.34
10
1.9
39
Classic Drone 215
Sports
$290.56
272
1.2
40
Mini Sneaker 570
Sports
$897.23
338
4.6

Variable row height

Pass RowHeightSelector a function that returns the desired height (in pixels) for a given row. Here premium products (price over $500) get a taller row.

1
Vintage Gadget 212
Home
$171.75
131
2
Eco Notebook 554
Clothing
$382.16
130
3
Classic Gadget 181
Premium · Wonka Inc · released Mar 2023
Toys
$813.02
269
4
Vintage Blender 267
Electronics
$310.12
291
5
Vintage Jacket 234
Electronics
$55.50
390
6
Smart Drone 229
Premium · Stark Industries · released Feb 2020
Electronics
$603.51
257
7
Eco Widget 428
Books
$72.97
359
8
Pro Blender 549
Premium · Acme Corp · released Jun 2020
Electronics
$825.55
6
9
Deluxe Mug 514
Premium · Wayne Enterprises · released Aug 2021
Clothing
$615.44
22
10
Mini Jacket 367
Premium · Initech · released Oct 2018
Grocery
$585.87
367
11
Vintage Gadget 192
Home
$334.92
388
12
Mini Mug 788
Premium · Acme Corp · released Jun 2020
Toys
$712.80
144
13
Classic Mug 124
Books
$267.79
19
14
Compact Gadget 195
Clothing
$325.60
375
15
Deluxe Speaker 932
Sports
$281.65
272
16
Eco Widget 307
Premium · Initech · released Dec 2022
Grocery
$982.55
390
17
Mini Blender 740
Premium · Wonka Inc · released Feb 2022
Electronics
$597.20
195
18
Pro Blender 952
Sports
$132.04
53
19
Classic Drone 459
Premium · Soylent · released Mar 2022
Electronics
$906.58
481
20
Mega Mug 839
Sports
$282.70
169
21
Mega Speaker 349
Premium · Wonka Inc · released Aug 2019
Books
$830.28
320
22
Modern Mug 947
Premium · Stark Industries · released Nov 2022
Home
$886.86
484
23
Mini Backpack 199
Sports
$349.39
260
24
Mini Speaker 940
Electronics
$60.13
107
25
Deluxe Lamp 430
Premium · Initech · released Apr 2019
Home
$760.77
331
26
Eco Mug 633
Toys
$388.23
478
27
Compact Camera 900
Electronics
$300.37
290
28
Mega Mug 366
Premium · Stark Industries · released Oct 2023
Grocery
$749.69
15
29
Mini Jacket 409
Premium · Acme Corp · released May 2020
Books
$604.08
321
30
Premium Camera 361
Grocery
$352.80
0
31
Mega Gadget 949
Premium · Initech · released Apr 2019
Books
$654.24
99
32
Mega Lamp 485
Premium · Stark Industries · released Oct 2021
Books
$787.62
277
33
Compact Backpack 302
Premium · Wayne Enterprises · released Oct 2020
Clothing
$540.00
406
34
Pro Mug 551
Grocery
$45.94
206
35
Ultra Mug 514
Clothing
$484.40
357
36
Pro Camera 944
Home
$211.34
473
37
Mini Notebook 156
Premium · Umbrella · released Feb 2023
Electronics
$900.67
312
38
Premium Jacket 198
Premium · Wayne Enterprises · released Jun 2019
Electronics
$651.34
10
39
Classic Drone 215
Sports
$290.56
272
40
Mini Sneaker 570
Premium · Wayne Enterprises · released Oct 2021
Sports
$897.23
338

Empty state

Supply an EmptyTemplate to customize the placeholder shown when there is no data, or rely on the built-in "No records to display" message.


📭
Nothing here yet
Try loading the sample data to populate the grid.

Borders & Striping

Toggle column/row borders and alternate-row striping using the Bordered and Striped parameters.


1
Vintage Gadget 212
Home
$171.75
131
2
Eco Notebook 554
Clothing
$382.16
130
3
Classic Gadget 181
Toys
$813.02
269
4
Vintage Blender 267
Electronics
$310.12
291
5
Vintage Jacket 234
Electronics
$55.50
390
6
Smart Drone 229
Electronics
$603.51
257
7
Eco Widget 428
Books
$72.97
359
8
Pro Blender 549
Electronics
$825.55
6
1–8 of 60
Page 1 of 8

RTL

Render the grid in a right-to-left layout by setting the Direction parameter to BitDir.Rtl.

1
قدیمی گجت 212
خانه
$171.75
131
2
اقتصادی دفترچه 554
پوشاک
$382.16
130
3
کلاسیک گجت 181
اسباب‌بازی
$813.02
269
4
قدیمی مخلوط‌کن 267
الکترونیک
$310.12
291
5
قدیمی ژاکت 234
الکترونیک
$55.50
390
6
هوشمند پهپاد 229
الکترونیک
$603.51
257
7
اقتصادی ویجت 428
کتاب
$72.97
359
8
حرفه‌ای مخلوط‌کن 549
الکترونیک
$825.55
6
1–8 of 60
Page 1 of 8

Filter operators

Set FilterOperators to let users pick the comparison for each filter instead of the fixed default: text columns offer contains / doesn't contain / starts with / ends with / = / ≠, while number and date columns offer = ≠ > ≥ < ≤. Changing the operator re-applies the current filter text. Individual columns can override the grid-level setting - the Supplier column opts out here, keeping its fixed default filter.

1
Vintage Gadget 212
Wayne Enterprises
$171.75
131
2023-01-19
2
Eco Notebook 554
Soylent
$382.16
130
2019-07-18
3
Classic Gadget 181
Wonka Inc
$813.02
269
2023-03-12
4
Vintage Blender 267
Wayne Enterprises
$310.12
291
2021-01-25
5
Vintage Jacket 234
Wayne Enterprises
$55.50
390
2022-08-20
6
Smart Drone 229
Stark Industries
$603.51
257
2020-02-18
7
Eco Widget 428
Wayne Enterprises
$72.97
359
2023-12-08
8
Pro Blender 549
Acme Corp
$825.55
6
2020-06-02
9
Deluxe Mug 514
Wayne Enterprises
$615.44
22
2021-08-11
10
Mini Jacket 367
Initech
$585.87
367
2018-10-04
11
Vintage Gadget 192
Soylent
$334.92
388
2022-10-27
12
Mini Mug 788
Acme Corp
$712.80
144
2020-06-09
13
Classic Mug 124
Acme Corp
$267.79
19
2021-09-09
14
Compact Gadget 195
Wayne Enterprises
$325.60
375
2023-10-09
15
Deluxe Speaker 932
Initech
$281.65
272
2022-12-13
16
Eco Widget 307
Initech
$982.55
390
2022-12-24
17
Mini Blender 740
Wonka Inc
$597.20
195
2022-02-04
18
Pro Blender 952
Stark Industries
$132.04
53
2018-11-08
19
Classic Drone 459
Soylent
$906.58
481
2022-03-05
20
Mega Mug 839
Wonka Inc
$282.70
169
2022-08-25
21
Mega Speaker 349
Wonka Inc
$830.28
320
2019-08-05
22
Modern Mug 947
Stark Industries
$886.86
484
2022-11-05
23
Mini Backpack 199
Wayne Enterprises
$349.39
260
2021-02-06
24
Mini Speaker 940
Initech
$60.13
107
2022-05-29
25
Deluxe Lamp 430
Initech
$760.77
331
2019-04-24
26
Eco Mug 633
Initech
$388.23
478
2019-03-07
27
Compact Camera 900
Stark Industries
$300.37
290
2021-10-02
28
Mega Mug 366
Stark Industries
$749.69
15
2023-10-08
29
Mini Jacket 409
Acme Corp
$604.08
321
2020-05-11
30
Premium Camera 361
Globex
$352.80
0
2023-02-25
31
Mega Gadget 949
Initech
$654.24
99
2019-04-16
32
Mega Lamp 485
Stark Industries
$787.62
277
2021-10-01
33
Compact Backpack 302
Wayne Enterprises
$540.00
406
2020-10-10
34
Pro Mug 551
Umbrella
$45.94
206
2020-12-02
35
Ultra Mug 514
Wayne Enterprises
$484.40
357
2022-12-21
36
Pro Camera 944
Wayne Enterprises
$211.34
473
2020-07-01
37
Mini Notebook 156
Umbrella
$900.67
312
2023-02-28
38
Premium Jacket 198
Wayne Enterprises
$651.34
10
2019-06-22
39
Classic Drone 215
Acme Corp
$290.56
272
2020-06-08
40
Mini Sneaker 570
Wayne Enterprises
$897.23
338
2021-10-15
41
Modern Camera 946
Globex
$661.07
44
2019-05-12
42
Vintage Mug 824
Initech
$444.42
453
2019-07-05
43
Mini Mug 925
Wonka Inc
$843.33
173
2023-06-08
44
Premium Camera 560
Globex
$35.33
277
2023-04-17
45
Vintage Gadget 237
Wonka Inc
$383.48
282
2022-06-28
46
Pro Drone 577
Initech
$285.56
438
2018-09-21
47
Eco Jacket 846
Wonka Inc
$59.26
414
2019-09-18
48
Smart Camera 226
Initech
$612.62
229
2020-04-16
49
Classic Gadget 202
Globex
$494.25
256
2020-04-01
50
Mega Sneaker 417
Soylent
$955.45
169
2021-10-05
51
Premium Gadget 932
Wayne Enterprises
$741.93
301
2021-08-24
52
Premium Lamp 283
Soylent
$943.60
49
2021-12-06
53
Pro Mug 237
Initech
$264.98
237
2020-05-19
54
Eco Lamp 139
Wonka Inc
$175.86
112
2022-01-01
55
Ultra Lamp 134
Wayne Enterprises
$47.06
77
2019-04-05
56
Ultra Blender 911
Initech
$80.83
62
2023-04-29
57
Ultra Gadget 323
Stark Industries
$647.39
313
2021-03-19
58
Deluxe Blender 420
Acme Corp
$506.54
17
2020-10-14
59
Deluxe Camera 513
Acme Corp
$234.18
305
2023-09-29
60
Eco Mug 642
Umbrella
$809.15
442
2022-11-03
61
Vintage Lamp 246
Acme Corp
$971.43
238
2022-01-09
62
Eco Backpack 738
Acme Corp
$366.59
112
2018-12-12
63
Ultra Notebook 129
Soylent
$488.57
483
2020-04-22
64
Deluxe Widget 171
Wayne Enterprises
$384.18
206
2019-06-29
65
Classic Gadget 833
Soylent
$866.59
268
2020-01-02
66
Eco Backpack 963
Acme Corp
$371.05
236
2020-06-02
67
Mini Mug 765
Wonka Inc
$200.57
57
2020-07-16
68
Mini Jacket 661
Wonka Inc
$632.20
439
2020-10-07
69
Modern Jacket 576
Wonka Inc
$429.20
49
2019-08-12
70
Compact Mug 696
Wayne Enterprises
$244.82
228
2019-07-29
71
Compact Backpack 959
Umbrella
$57.23
410
2021-01-14
72
Ultra Lamp 199
Acme Corp
$249.92
68
2022-04-21
73
Ultra Backpack 762
Globex
$991.34
272
2018-12-06
74
Pro Jacket 295
Soylent
$37.91
45
2023-10-23
75
Compact Notebook 426
Acme Corp
$869.12
262
2020-11-21
76
Ultra Sneaker 789
Soylent
$743.04
101
2019-09-20
77
Premium Notebook 878
Globex
$39.85
338
2020-05-02
78
Vintage Drone 655
Umbrella
$121.29
349
2019-05-08
79
Mega Backpack 316
Wayne Enterprises
$138.33
341
2023-07-07
80
Premium Speaker 971
Globex
$496.89
335
2022-06-27
81
Smart Drone 360
Acme Corp
$386.83
188
2020-10-02
82
Deluxe Blender 445
Initech
$839.34
180
2022-09-27
83
Premium Backpack 267
Umbrella
$990.93
267
2022-11-16
84
Smart Jacket 232
Wayne Enterprises
$165.02
30
2021-08-13
85
Mini Blender 920
Globex
$972.58
325
2020-04-03
86
Mega Jacket 789
Wayne Enterprises
$115.31
301
2021-09-19
87
Vintage Widget 871
Wayne Enterprises
$789.53
249
2023-03-10
88
Deluxe Speaker 647
Initech
$821.84
277
2019-04-12
89
Vintage Widget 465
Soylent
$842.64
426
2021-01-11
90
Mega Widget 469
Umbrella
$80.52
231
2022-08-18
91
Smart Widget 559
Soylent
$237.33
179
2023-06-18
92
Modern Notebook 627
Wonka Inc
$122.02
322
2022-05-11
93
Deluxe Gadget 268
Initech
$140.42
445
2021-10-31
94
Deluxe Widget 902
Umbrella
$57.75
331
2019-06-06
95
Ultra Notebook 212
Umbrella
$746.51
185
2021-06-14
96
Modern Camera 519
Initech
$566.30
77
2019-10-22
97
Mini Sneaker 907
Umbrella
$669.96
391
2023-11-24
98
Premium Gadget 957
Wayne Enterprises
$876.10
309
2019-05-25
99
Pro Lamp 602
Wonka Inc
$554.84
1
2019-07-12
100
Modern Drone 762
Wonka Inc
$954.83
145
2022-04-12
101
Compact Speaker 386
Wonka Inc
$311.73
325
2021-08-23
102
Premium Backpack 171
Stark Industries
$870.04
17
2023-01-02
103
Eco Sneaker 447
Soylent
$672.77
258
2019-04-30
104
Eco Drone 897
Wonka Inc
$773.92
125
2020-05-29
105
Ultra Camera 236
Wonka Inc
$753.54
49
2020-08-13
106
Ultra Lamp 284
Wayne Enterprises
$743.01
95
2022-02-28
107
Eco Lamp 818
Soylent
$719.62
259
2022-10-12
108
Deluxe Drone 348
Soylent
$594.68
156
2022-01-03
109
Compact Backpack 857
Soylent
$505.47
381
2023-04-19
110
Pro Mug 290
Globex
$668.14
303
2023-03-12
111
Smart Notebook 561
Umbrella
$70.40
210
2023-09-24
112
Mini Notebook 849
Wonka Inc
$800.06
276
2022-02-26
113
Premium Blender 168
Wonka Inc
$209.63
441
2020-09-02
114
Eco Jacket 431
Acme Corp
$272.87
335
2019-04-12
115
Mini Lamp 272
Acme Corp
$46.93
50
2023-09-05
116
Compact Speaker 973
Globex
$142.04
375
2019-09-09
117
Compact Sneaker 386
Globex
$228.73
102
2021-04-25
118
Classic Sneaker 107
Acme Corp
$382.65
303
2020-09-28
119
Vintage Widget 418
Soylent
$12.35
484
2018-08-04
120
Pro Notebook 154
Wayne Enterprises
$118.32
402
2021-06-03
121
Premium Lamp 962
Soylent
$728.29
103
2019-07-31
122
Classic Camera 352
Initech
$445.95
485
2023-09-18
123
Deluxe Sneaker 745
Soylent
$704.71
47
2023-04-01
124
Pro Speaker 915
Wayne Enterprises
$949.11
150
2019-11-01
125
Vintage Drone 433
Globex
$133.49
280
2022-09-22
126
Classic Jacket 170
Stark Industries
$994.79
191
2022-10-19
127
Pro Camera 622
Globex
$100.71
79
2020-01-06
128
Compact Mug 159
Globex
$518.42
94
2019-05-25
129
Premium Jacket 186
Soylent
$193.57
44
2019-11-08
130
Mini Widget 287
Wonka Inc
$312.40
419
2022-01-10
131
Mega Lamp 685
Wayne Enterprises
$217.00
198
2020-03-13
132
Compact Lamp 232
Acme Corp
$551.55
77
2023-10-13
133
Ultra Notebook 787
Stark Industries
$559.94
439
2018-11-06
134
Premium Notebook 909
Wayne Enterprises
$543.46
298
2019-09-25
135
Modern Notebook 998
Globex
$582.45
62
2020-11-11
136
Ultra Lamp 189
Initech
$960.10
169
2021-02-08
137
Mega Jacket 895
Wonka Inc
$686.26
364
2021-02-07
138
Pro Sneaker 825
Umbrella
$204.05
340
2020-11-08
139
Compact Drone 430
Globex
$640.69
321
2019-01-16
140
Deluxe Speaker 529
Wayne Enterprises
$182.60
233
2022-08-01
141
Mini Drone 644
Initech
$685.09
120
2023-03-06
142
Ultra Camera 925
Acme Corp
$363.90
483
2021-12-15
143
Mini Widget 433
Stark Industries
$85.99
138
2023-08-21
144
Eco Notebook 601
Umbrella
$862.01
172
2023-06-19
145
Compact Notebook 457
Globex
$135.80
484
2023-07-23
146
Pro Jacket 647
Umbrella
$283.14
280
2021-01-25
147
Compact Notebook 807
Acme Corp
$49.28
395
2022-10-01
148
Compact Speaker 101
Acme Corp
$80.59
134
2022-12-14
149
Ultra Mug 354
Initech
$241.36
449
2021-08-04
150
Premium Sneaker 292
Initech
$478.05
330
2020-11-04

Edit validation

Give a column a Validate function to check proposed edits. While any editor holds an invalid value, the message renders under it and Save is blocked. Edits are buffered - the underlying object is only modified when Save is clicked, so Cancel always leaves the row untouched. Try clearing the Name, or entering a negative Price or Stock.

Actions
1
Vintage Gadget 212
$171.75
131
2
Eco Notebook 554
$382.16
130
3
Classic Gadget 181
$813.02
269
4
Vintage Blender 267
$310.12
291
5
Vintage Jacket 234
$55.50
390
6
Smart Drone 229
$603.51
257
7
Eco Widget 428
$72.97
359
8
Pro Blender 549
$825.55
6
1–8 of 30
Page 1 of 4

State persistence

GetState() captures the user-adjustable state (page, page size, sorts, filters, groups and column layout) as a serializable snapshot; ApplyStateAsync() restores it. Adjust the grid (sort, filter, resize, hide columns, change page), save the state, shuffle things around, then restore.

Adjust the grid, then save its state.

1
Vintage Gadget 212
Home
$171.75
131
2
Eco Notebook 554
Clothing
$382.16
130
3
Classic Gadget 181
Toys
$813.02
269
4
Vintage Blender 267
Electronics
$310.12
291
5
Vintage Jacket 234
Electronics
$55.50
390
6
Smart Drone 229
Electronics
$603.51
257
7
Eco Widget 428
Books
$72.97
359
8
Pro Blender 549
Electronics
$825.55
6
9
Deluxe Mug 514
Clothing
$615.44
22
10
Mini Jacket 367
Grocery
$585.87
367
1–10 of 120
Page 1 of 12

Server-side virtualization

Combine Virtualize with OnRead (and no paging) to browse an arbitrarily large remote dataset: row windows are fetched on demand as you scroll - this example simulates 100,000 rows. The footer shows server-provided aggregates (via BitDataGridReadResult.Aggregates) computed over the whole filtered dataset, and the Rating column is pinned to the end edge with FrozenEnd.

Localization

Every user-visible string - pager, empty/loading texts, filter placeholders, edit buttons, aria-labels and screen-reader announcements - comes from the Strings parameter (a BitDataGridStrings). Assign a customized instance to localize the grid; this example renders a Persian (RTL) grid.

1
قدیمی گجت 212
$171.75
131
2
اقتصادی دفترچه 554
$382.16
130
3
کلاسیک گجت 181
$813.02
269
4
قدیمی مخلوط‌کن 267
$310.12
291
5
قدیمی ژاکت 234
$55.50
390
6
هوشمند پهپاد 229
$603.51
257
7
اقتصادی ویجت 428
$72.97
359
8
حرفه‌ای مخلوط‌کن 549
$825.55
6
1–8 از 60
صفحهٔ 1 از 8

IQueryable data source

Bind an IQueryable<T> to Items and the grid translates filtering, sorting and paging into expression trees composed onto the queryable - so a remote LINQ provider such as EF Core executes them at the source (SQL WHERE/ORDER BY/OFFSET) and only the current page is ever materialized. This example uses an in-memory queryable; bind dbContext.Products the same way.

1
Vintage Gadget 212
Wayne Enterprises
$171.75
131
2
Eco Notebook 554
Soylent
$382.16
130
3
Classic Gadget 181
Wonka Inc
$813.02
269
4
Vintage Blender 267
Wayne Enterprises
$310.12
291
5
Vintage Jacket 234
Wayne Enterprises
$55.50
390
6
Smart Drone 229
Stark Industries
$603.51
257
7
Eco Widget 428
Wayne Enterprises
$72.97
359
8
Pro Blender 549
Acme Corp
$825.55
6
9
Deluxe Mug 514
Wayne Enterprises
$615.44
22
10
Mini Jacket 367
Initech
$585.87
367
1–10 of 400
Page 1 of 40

Excel export

ShowExcelExport adds a toolbar button that downloads the full (filtered/sorted) data as a real .xlsx workbook - generated in-process with no external library. Numbers and booleans are written as native cell types so spreadsheet formulas work on them, and the workbook mirrors the grid's layout: a bold, frozen header row, the grid's column widths, frozen columns as Excel freeze panes and ColSpan cells as merged cells. With ExcelExportStyled the workbook also carries the grid's current visual theme - the rendered header/row colors, the striped alternating background, the border color and bold/italic fonts are sampled from the live DOM at export time, so whatever theme is active (light, dark, custom) is what lands in the file. Exports always cover all matching rows, not just the rendered ones: server and infinite-scrolling modes fetch the full set through OnRead/OnLoadMore, and tree mode includes collapsed branches.

1
Vintage Gadget 212
Home
$171.75
131
False
2
Eco Notebook 554
Clothing
$382.16
130
True
3
Classic Gadget 181
Toys
$813.02
269
False
4
Vintage Blender 267
Electronics
$310.12
291
True
5
Vintage Jacket 234
Electronics
$55.50
390
True
6
Smart Drone 229
Electronics
$603.51
257
False
7
Eco Widget 428
Books
$72.97
359
False
8
Pro Blender 549
Electronics
$825.55
6
True
9
Deluxe Mug 514
Clothing
$615.44
22
True
10
Mini Jacket 367
Grocery
$585.87
367
False
1–10 of 120
Page 1 of 12

Export with complex layouts

This grid combines a master-detail DetailTemplate, frozen ID/Name columns and ColSpan spanning (discontinued rows span Name over Category) - try scrolling, expanding details and filtering, then export. The Excel file mirrors the layout: the frozen ID/Name columns (plus the header row) become a freeze pane and each spanning cell becomes a merged cell. The data stays faithful in both formats: frozen columns keep their declared order, a templated field column (Name) exports the raw field value rather than its markup, detail content is not exported (master rows only), and the template-only Value column (no Field) is skipped. CSV has no layout concepts, so it stays flat - there every column exports its own value, including the Category a span covers.

1
Vintage Gadget 212
Home
$171.75
131
Wayne Enterprises
$22,499
2
⚠ Eco Notebook 554 - discontinued
$382.16
130
Soylent
$49,681
3
Classic Gadget 181
Toys
$813.02
269
Wonka Inc
$218,702
4
⚠ Vintage Blender 267 - discontinued
$310.12
291
Wayne Enterprises
$90,245
5
⚠ Vintage Jacket 234 - discontinued
$55.50
390
Wayne Enterprises
$21,645
6
Smart Drone 229
Electronics
$603.51
257
Stark Industries
$155,102
7
Eco Widget 428
Books
$72.97
359
Wayne Enterprises
$26,196
8
⚠ Pro Blender 549 - discontinued
$825.55
6
Acme Corp
$4,953
9
⚠ Deluxe Mug 514 - discontinued
$615.44
22
Wayne Enterprises
$13,540
10
Mini Jacket 367
Grocery
$585.87
367
Initech
$215,014
11
⚠ Vintage Gadget 192 - discontinued
$334.92
388
Soylent
$129,949
12
Mini Mug 788
Toys
$712.80
144
Acme Corp
$102,643
13
Classic Mug 124
Books
$267.79
19
Acme Corp
$5,088
14
⚠ Compact Gadget 195 - discontinued
$325.60
375
Wayne Enterprises
$122,100
15
Deluxe Speaker 932
Sports
$281.65
272
Initech
$76,609
16
Eco Widget 307
Grocery
$982.55
390
Initech
$383,195
17
Mini Blender 740
Electronics
$597.20
195
Wonka Inc
$116,454
18
⚠ Pro Blender 952 - discontinued
$132.04
53
Stark Industries
$6,998
19
⚠ Classic Drone 459 - discontinued
$906.58
481
Soylent
$436,065
20
Mega Mug 839
Sports
$282.70
169
Wonka Inc
$47,776
21
Mega Speaker 349
Books
$830.28
320
Wonka Inc
$265,690
22
Modern Mug 947
Home
$886.86
484
Stark Industries
$429,240
23
Mini Backpack 199
Sports
$349.39
260
Wayne Enterprises
$90,841
24
⚠ Mini Speaker 940 - discontinued
$60.13
107
Initech
$6,434
25
Deluxe Lamp 430
Home
$760.77
331
Initech
$251,815
26
Eco Mug 633
Toys
$388.23
478
Initech
$185,574
27
Compact Camera 900
Electronics
$300.37
290
Stark Industries
$87,107
28
Mega Mug 366
Grocery
$749.69
15
Stark Industries
$11,245
29
Mini Jacket 409
Books
$604.08
321
Acme Corp
$193,910
30
Premium Camera 361
Grocery
$352.80
0
Globex
$0

Lazy tree loading

Set ChildrenProvider (instead of ChildrenSelector) to fetch a node's children asynchronously on first expand - e.g. from a backend - with the results cached for later toggles. Pair it with HasChildrenSelector so unloaded nodes know whether to render an expand toggle. Expanding a folder below simulates a 600 ms backend call.

Name
Kind
Size
Modified
src
Folder
0
2025-01-10
docs
Folder
0
2025-02-05
assets
Folder
0
2025-03-20
LICENSE
File
1,070
2025-01-02

Touch drag & drop

Row and column reordering work with touch and pen as well as mouse: pointer-event based drag-and-drop drives the same reorder pipeline on devices where native HTML5 drag-and-drop doesn't fire. Try it on a touchscreen - drag the ⠿ handle to move a row, or drag a column header to reorder columns; the drop target is highlighted while dragging.

ID
Name
Category
Price
1
Vintage Gadget 212
Home
$171.75
2
Eco Notebook 554
Clothing
$382.16
3
Classic Gadget 181
Toys
$813.02
4
Vintage Blender 267
Electronics
$310.12
5
Vintage Jacket 234
Electronics
$55.50
6
Smart Drone 229
Electronics
$603.51
7
Eco Widget 428
Books
$72.97
8
Pro Blender 549
Electronics
$825.55
9
Deluxe Mug 514
Clothing
$615.44
10
Mini Jacket 367
Grocery
$585.87
11
Vintage Gadget 192
Home
$334.92
12
Mini Mug 788
Toys
$712.80

Column virtualization

VirtualizeColumns renders only the columns in (and near) the horizontal viewport, replacing scrolled-out runs with spacer cells - for grids with very many columns. This example declares 40 measurement columns (plus a frozen ID column) but only the visible window exists in the DOM while you scroll horizontally. Combine it with row Virtualize for large datasets in both dimensions. Columns need explicit pixel widths.

ID
Name
M01
M02
M03
M04
M05
M06
M07
M08
M09
M10
M11
M12
M13
M14
M15
M16
M17
M18
M19
M20
M21
M22
M23
M24
M25
M26
M27
M28
M29
M30
M31
M32
M33
M34
M35
M36
M37
M38
M39
M40

Programmatic control

Everything a user can do through the UI is also a public API on the grid: drive sorting, filtering, grouping, paging and refresh from code with SortByAsync / ClearSortsAsync, ApplyFilterAsync / ClearFiltersAsync, GroupByAsync / UngroupAsync, GoToPageAsync, SetPageSizeAsync and RefreshAsync.


1
Vintage Gadget 212
Home
$171.75
131
2
Eco Notebook 554
Clothing
$382.16
130
3
Classic Gadget 181
Toys
$813.02
269
4
Vintage Blender 267
Electronics
$310.12
291
5
Vintage Jacket 234
Electronics
$55.50
390
6
Smart Drone 229
Electronics
$603.51
257
7
Eco Widget 428
Books
$72.97
359
8
Pro Blender 549
Electronics
$825.55
6
9
Deluxe Mug 514
Clothing
$615.44
22
10
Mini Jacket 367
Grocery
$585.87
367
1–10 of 200
Page 1 of 20

API

BitDataGrid parameters

Name Type Default value Description
Items IEnumerable<TItem>? null The data source bound to the grid for client-side processing. An IQueryable<T> (e.g. an EF Core DbSet) gets filtering/sorting/paging translated into expression trees the provider executes at the source, materializing only the current page.
OnRead Func<BitDataGridReadRequest, Task<BitDataGridReadResult<TItem>>>? null Server-side data callback. When set, the grid delegates sort/filter/page/group to the caller.
OnLoadMore Func<BitDataGridReadRequest, Task<BitDataGridReadResult<TItem>>>? null Infinite-scrolling data callback. Loads rows in batches and appends the next batch as the user scrolls toward the end. CSV/Excel exports issue a single request with Take = null ("all rows"), so the handler should honor a null Take.
LoadMoreBatchSize int 50 Number of rows fetched per batch in infinite-scrolling mode.
ChildContent RenderFragment? null Column definitions and other declarative children.
Columns RenderFragment? null Alias of ChildContent, letting column definitions read declaratively as <Columns>...</Columns>. Both fragments are rendered when both are set.
Loading bool false Shows a loading overlay while data is being fetched.
KeyField Func<TItem, object>? null Optional key selector used for selection/edit identity. Defaults to reference equality.
ChildrenSelector Func<TItem, IEnumerable<TItem>?>? null Child selector that turns the grid into a hierarchical tree grid.
ChildrenProvider Func<TItem, Task<IEnumerable<TItem>?>>? null Async children provider for a lazily-loaded tree grid: children are fetched on a node's first expand (e.g. from a backend) and cached. Mutually exclusive with ChildrenSelector; pair with HasChildrenSelector.
HasChildrenSelector Func<TItem, bool>? null Tells whether a node can have children before they are loaded, so unloaded lazy nodes render an expand toggle. Only used with ChildrenProvider.
TreeInitiallyExpanded bool false When tree mode is active, controls whether nodes start expanded. Ignored in lazy mode (ChildrenProvider).
Class string? null Custom CSS class for the root element.
Style string? null Custom inline style for the root element.
Height string? null Height of the scroll viewport, e.g. "480px". Required for virtualization and infinite scrolling.
Striped bool true Renders alternate-row striping.
Hoverable bool true Highlights the row under the pointer.
Bordered bool true Renders cell borders.
ShowHeader bool true Renders the header row.
ShowFooter bool false Renders the footer/aggregate row.
Direction BitDir BitDir.Ltr Text direction (LTR/RTL).
Sortable bool true Enables column sorting by clicking headers.
MultiSort bool true Enables multi-column sorting via Ctrl/⌘+click with priority badges.
Filterable bool false Renders a per-column quick-filter row.
FilterOperators bool false Shows an operator dropdown next to text/number/date filter editors so users pick the comparison (contains/starts with/=/≠/>/≥/</≤) instead of the fixed default.
Strings BitDataGridStrings new() All user-visible strings rendered by the grid; assign a customized instance to localize the UI.
Resizable bool false Enables column resizing by dragging header edges.
Reorderable bool false Enables column reordering via drag-and-drop (mouse via native HTML5 DnD, touch/pen via a pointer-event fallback).
Groupable bool false Enables grouping via a header button on groupable columns.
ShowToolbar bool false Renders the toolbar area.
ShowColumnChooser bool false Renders a column show/hide chooser in the toolbar.
ShowCsvExport bool false Renders a CSV export button. The export covers all matching rows in every data mode, not just the rendered ones.
ShowExcelExport bool false Renders an Excel (.xlsx) export button. The workbook is generated in-process with no external dependency, covers all matching rows in every data mode, and mirrors the grid's layout: bold frozen header row, column widths, leading frozen columns as a freeze pane and ColSpan cells as merged cells.
ExcelExportStyled bool false When true, Excel exports also carry the grid's current visual theme: the rendered header/row colors, striped alternating rows, border color and bold/italic fonts are sampled from the live DOM at export time (so the active theme - including dark mode - lands in the workbook). Falls back to the plain bold-header styling when JS is unavailable (prerendering).
CellNavigation bool false Enables keyboard cell navigation with a roving tabindex (arrows/Home/End/PageUp/PageDown to move, Enter/F2 to edit, Delete to delete the focused row when Editable).
RowReorderable bool false Enables drag-and-drop row reordering (mouse, touch and pen; plus keyboard via the drag handle's arrow keys).
OnRowReorder EventCallback<BitDataGridRowReorderEventArgs<TItem>> Raised when a row is dropped onto another row during reordering.
SelectionMode BitDataGridSelectionMode BitDataGridSelectionMode.None How rows can be selected (None/Single/Multiple).
SelectedItems IReadOnlyList<TItem>? null The selected items (supports two-way binding).
SelectedItemsChanged EventCallback<IReadOnlyList<TItem>> Raised when the selection changes.
OnRowClick EventCallback<TItem> Raised when a row is clicked.
OnCellClick EventCallback<BitDataGridCellEventArgs<TItem>> Raised when a data cell is clicked.
OnCellDoubleClick EventCallback<BitDataGridCellEventArgs<TItem>> Raised when a data cell is double-clicked.
OnCellContextMenu EventCallback<BitDataGridCellEventArgs<TItem>> Raised when a data cell is right-clicked.
IsRowSelectionDisabled Func<TItem, bool>? null Predicate returning true when a given row may not be selected.
Pageable bool false Enables paging with a pager UI.
PageSize int 20 The number of rows per page.
PageSizeOptions int[] { 10, 20, 50, 100 } The page-size options offered in the pager dropdown.
PagerPosition BitDataGridPagerPosition BitDataGridPagerPosition.Bottom Where the pager renders relative to the grid.
Virtualize bool false Renders only the visible rows for large datasets. Requires a fixed Height and RowHeight. In server mode (OnRead) with paging off, row windows are fetched on demand as the user scrolls; with OnLoadMore, the accumulated batches are virtualized so the DOM stays bounded.
RowHeight float 36 Uniform row height in pixels (required when virtualizing).
RowHeightSelector Func<TItem, float>? null Optional per-row height selector (ignored while virtualizing).
VirtualizeColumns bool false Renders only the columns in (and near) the horizontal viewport, replacing scrolled-out runs with spacers - for grids with very many columns. Requires explicit px column widths; not applied with column header groups or ColSpans.
Editable bool false Enables inline editing with a command column.
NewItemFactory Func<TItem>? null Factory used by the toolbar Add button to create a new row.
OnRowSave EventCallback<TItem> Raised when an edited row is saved.
OnRowCancel EventCallback<TItem> Raised when an edit is cancelled.
OnRowDelete EventCallback<TItem> Raised when a row is deleted (via the command column's Delete button or the Delete key in cell navigation).
OnRowCreate EventCallback<TItem> Raised when a new row is created.
EmptyTemplate RenderFragment? null Custom content rendered when there is no data.
ToolbarTemplate RenderFragment? null Custom content rendered in the toolbar's start area.
DetailTemplate RenderFragment<TItem>? null Expandable master-detail content rendered under a row.

BitDataGrid public members

Name Type Default value Description
RefreshAsync Task Recomputes the data view (filter → sort → group → page) and re-renders the grid.
SortByAsync Task SortByAsync(columnId, direction, additive) - programmatically sorts by a column; BitDataGridSortDirection.None removes the sort.
ClearSortsAsync Task Removes all active sorts and refreshes.
ApplyFilterAsync Task ApplyFilterAsync(columnId, operator, value) - programmatically applies a filter, replacing any existing one on the column.
ClearFilterAsync Task ClearFilterAsync(columnId) - removes the filter(s) applied to a column.
ClearFiltersAsync Task Clears all active column filters and refreshes.
GroupByAsync Task GroupByAsync(columnId) - adds the column as the next (nested) grouping level.
UngroupAsync Task UngroupAsync(columnId) - removes the column's grouping level.
ClearGroupsAsync Task Removes all active groupings and refreshes.
GoToPageAsync Task GoToPageAsync(page) - navigates to the given 1-based page (clamped to the valid range).
SetPageSizeAsync Task SetPageSizeAsync(size) - changes the page size and resets to the first page (without mutating the PageSize parameter).
GetState BitDataGridState Captures the user-adjustable state (page, page size, sorts, filters, groups, column layout) as a serializable snapshot.
ApplyStateAsync Task ApplyStateAsync(state) - restores a state snapshot captured by GetState.
ExportCsvAsync Task Generates the full (filtered/sorted) data as CSV and triggers a client-side download. Covers all matching rows in every data mode - server/infinite modes fetch them through OnRead/OnLoadMore, tree mode includes collapsed branches.
ToCsv string Builds a CSV string of the full dataset synchronously - tree mode includes collapsed branches, queryable mode covers all pages. Only server/infinite modes are limited to the loaded rows (their providers are async); use ToCsvAsync there.
ToCsvAsync Task<string> Builds a CSV string of the full dataset - server/infinite modes issue an OnRead/OnLoadMore request with no paging (Take = null), tree mode includes collapsed branches.
ToExcelAsync Task<byte[]> Generates the full (filtered/sorted) dataset as an Excel workbook (.xlsx), covering all matching rows in every data mode (like ToCsvAsync). The workbook mirrors the grid's layout: bold frozen header row, column widths, leading frozen columns as a freeze pane and ColSpan cells as merged cells; with ExcelExportStyled it also carries the grid's rendered theme (colors, striping, borders, fonts).
ExportExcelAsync Task Generates the .xlsx workbook and triggers a client-side download.
ActiveSorts IReadOnlyList<BitDataGridSortDescriptor> [] The active sort descriptors, in priority order.
ActiveFilters IReadOnlyList<BitDataGridFilterDescriptor> [] The active filter descriptors.
ActiveGroups IReadOnlyList<BitDataGridGroupDescriptor> [] The active group descriptors, in nesting order.
TotalCount int 0 Total number of rows in the current (filtered) view; the server-reported total in server mode.
TotalPages int 1 Total number of pages while paging is active.
CurrentPage int 1 The 1-based current page.
ExpandAllAsync Task Expands every node in the tree. No-op outside tree mode.
CollapseAllAsync Task Collapses every node in the tree. No-op outside tree mode.

BitDataGridColumn properties

Defines a column inside a BitDataGrid. Place these as child content of the grid.

Name Type Default value Description
Field string? null Name of the property this column is bound to. Supports nested paths ("Address.City"). Prefer Property for a strongly typed, refactor-safe alternative.
Property Expression<Func<TItem, object?>>? null Typed selector of the property this column is bound to, e.g. Property="p => p.Name". A strongly typed, refactor-safe alternative to Field that supports nested member chains (p => p.Address.City). Takes precedence over Field when both are set.
ColumnId string? null Stable identifier for the column. Defaults to the resolved Property/Field path.
Title string? null Header text. Defaults to a humanized Property/Field name.
Width string? null CSS width, e.g. "120px" or "20%". When null the column shares remaining space.
MinWidth int 60 Minimum width in pixels the column can be resized to.
MaxWidth int? null Maximum width in pixels the column can be resized to.
Sortable bool? null Overrides the grid-level Sortable for this column.
SortBy Func<TItem, object?>? null Custom sort key selector. Enables sorting for template-only columns and overrides the field value as the sort key (client mode).
SortDescendingFirst bool false When true, the first click on the header sorts descending instead of ascending.
Validate Func<TItem, object?, string?>? null Validator for inline edits: receives the row and the proposed value, returns an error message to reject it (blocking Save) or null to accept.
Filterable bool? null Overrides the grid-level Filterable for this column.
FilterOperators bool? null Overrides the grid-level FilterOperators (the operator dropdown next to this column's filter editor).
Resizable bool? null Overrides the grid-level Resizable for this column.
Reorderable bool? null Overrides the grid-level Reorderable for this column.
Editable bool? null Overrides the grid-level Editable for this column.
Groupable bool? null Overrides the grid-level Groupable for this column.
Frozen bool false Pins the column to the start edge so it stays visible while scrolling horizontally.
FrozenEnd bool false Pins the column to the end edge (right in LTR, left in RTL). Typical for action/status columns.
Group string? null Optional header group name. Consecutive columns sharing the same value render under a single spanning header cell.
ColSpan Func<TItem, int?>? null Optional per-row column span.
Visible bool true Whether the column is visible.
Align BitDataGridColumnAlign BitDataGridColumnAlign.Left Horizontal alignment of cell content.
Format string? null A .NET format string applied to the value (e.g. "C2", "yyyy-MM-dd").
DataType BitDataGridColumnDataType BitDataGridColumnDataType.Auto The data type used to pick the editor/filter.
Aggregate BitDataGridAggregateType BitDataGridAggregateType.None The footer/group aggregate function.
AggregateBy Func<IReadOnlyList<TItem>, object?>? null Custom aggregate function for computations beyond the built-ins (e.g. distinct count). Takes precedence over Aggregate.
AggregateFormat string? null Format string for the aggregate value. Falls back to Format.
HeaderClass string? null Custom CSS class applied to the header cell.
CellClass string? null Custom CSS class applied to each data cell.
Template RenderFragment<TItem>? null Custom rendering for a data cell.
HeaderTemplate RenderFragment? null Custom rendering for the header cell content.
EditTemplate RenderFragment<TItem>? null Custom editor rendered when the row/cell is in edit mode.
FooterTemplate RenderFragment<BitDataGridAggregateResult>? null Custom rendering for the footer/aggregate cell.

BitDataGridReadRequest properties

Describes the data the grid needs from a server-side/infinite source (passed to OnRead/OnLoadMore).

Name Type Default value Description
Skip int 0 Zero-based number of items to skip.
Take int? null Maximum number of items to return (null means all).
Sorts IReadOnlyList<BitDataGridSortDescriptor> [] The active sort descriptors ordered by priority.
Filters IReadOnlyList<BitDataGridFilterDescriptor> [] The active filter descriptors.
Groups IReadOnlyList<BitDataGridGroupDescriptor> [] The active group descriptors in nesting order, letting a server-side handler reconstruct the grouping. Empty when no grouping is active.
CancellationToken CancellationToken A token that is cancelled when the request is superseded by a newer one.

BitDataGridReadResult<TItem> properties

Result returned from a grid's OnRead/OnLoadMore callback.

Name Type Default value Description
Items IReadOnlyList<TItem> The items for the current page/window.
TotalCount int The total number of items matching the current filters (ignored in infinite mode).
Aggregates IReadOnlyList<BitDataGridAggregateResult>? null Optional aggregates computed by the data source over the whole filtered dataset; when provided, the footer shows these instead of aggregating the current page locally.

BitDataGridCellEventArgs<TItem> properties

Arguments passed to cell-level event callbacks.

Name Type Default value Description
Item TItem The row item.
Column BitDataGridColumn<TItem> The column the cell belongs to.
ColumnId string The column field/identifier.
ColumnTitle string The column's display title.
Value object? null The raw value of the cell.
Mouse MouseEventArgs The underlying browser mouse event.

BitDataGridRowReorderEventArgs<TItem> properties

Arguments raised when a row is reordered via drag-and-drop.

Name Type Default value Description
DraggedItem TItem The dragged row item.
TargetItem TItem The drop-target row item.
FromIndex int? The original index of the dragged item, or null when the bound Items is not an indexable list.
ToIndex int? The destination index, or null when the bound Items is not an indexable list.

BitDataGridSortDescriptor properties

Describes the sort state applied to a single column (found on BitDataGridReadRequest.Sorts).

Name Type Default value Description
ColumnId string The identifier of the column being sorted.
Direction BitDataGridSortDirection BitDataGridSortDirection.Ascending The sort direction.
Priority int int.MaxValue Priority for multi-column sorting (1 = primary).

BitDataGridFilterDescriptor properties

Describes a filter applied to a single column (found on BitDataGridReadRequest.Filters).

Name Type Default value Description
ColumnId string The identifier of the column being filtered.
Operator BitDataGridFilterOperator BitDataGridFilterOperator.Contains The comparison operator applied to the value.
Value object? null The value compared against the column's cell value.

BitDataGridGroupDescriptor properties

Describes a grouping applied to a column.

Name Type Default value Description
ColumnId string The identifier of the column being grouped.
Direction BitDataGridSortDirection BitDataGridSortDirection.Ascending The sort direction applied to the group keys.

BitDataGridAggregateResult properties

Holds the computed aggregate value for a column footer or group (passed to a column's FooterTemplate).

Name Type Default value Description
ColumnId string The identifier of the aggregated column.
Type BitDataGridAggregateType The aggregate function that produced the value.
Value object? null The raw aggregate value.
FormattedValue string string.Empty The aggregate value formatted using the column's AggregateFormat/Format.

BitDataGridState properties

A serializable snapshot of the grid's user-adjustable state, captured with GetState() and restored with ApplyStateAsync(). Enables persisting grid state across sessions.

Name Type Default value Description
CurrentPage int 1 The 1-based current page.
PageSize int? null The user-selected page size, or null when the grid's PageSize parameter applies.
Sorts List<BitDataGridSortDescriptor> [] The active sort descriptors.
Filters List<BitDataGridFilterDescriptor> [] The active filter descriptors.
Groups List<BitDataGridGroupDescriptor> [] The active group descriptors.
Columns List<BitDataGridColumnState> [] Per-column layout state.

BitDataGridColumnState properties

A per-column layout entry inside BitDataGridState.Columns.

Name Type Default value Description
ColumnId string string.Empty The column's stable identifier (ColumnId or Field).
Visible bool true Whether the column is shown (column-chooser state).
Width double? null The resized width in pixels, or null when the column was never resized.
Order int 0 The display position among all columns.

BitDataGridStrings properties

All user-visible (and screen-reader) strings rendered by the grid, defaulting to English. Assign a customized instance to the Strings parameter to localize - including empty/loading texts, pager texts, filter placeholders and operators, edit buttons, aggregate labels, aria-labels and live-region announcements.

Name Type Default value Description
EmptyText string "No records to display." Shown when the grid has no rows to display.
LoadingText string "Loading…" Shown while Loading is true.
PagerRangeFormat string "{0}–{1} of {2}" Pager range summary format.
PagerPageFormat string "Page {0} of {1}" Pager page summary format.
InvalidValueError string "Invalid value for {0}." Error shown when an edited value can't be converted to the column's type.
string Plus ~40 more: toolbar/edit button texts, filter placeholder and operator labels, boolean/enum option texts, group/detail/tree/reorder aria-labels, aggregate label formats and aria-live announcements.

BitDataGridColumnAlign enum

Name Value Description
Left 0
Center 1
Right 2

BitDataGridSortDirection enum

Name Value Description
None 0
Ascending 1
Descending 2

BitDataGridSelectionMode enum

Name Value Description
None 0
Single 1
Multiple 2

BitDataGridAggregateType enum

Name Value Description
None 0
Sum 1
Average 2
Count 3
Min 4
Max 5
Custom 6 The value was produced by the column's custom AggregateBy delegate rather than a built-in function.

BitDataGridPagerPosition enum

Name Value Description
Bottom 0
Top 1
TopAndBottom 2

BitDir enum

Name Value Description
Ltr 0
Rtl 1
Auto 2

BitDataGridColumnDataType enum

Name Value Description
Auto 0
Text 1
Number 2
Boolean 3
Date 4
DateTime 5
DateTimeOffset 6
Enum 7

BitDataGridFilterOperator enum

Name Value Description
Unspecified 0
Contains 1
DoesNotContain 2
StartsWith 3
EndsWith 4
Equals 5
NotEquals 6
GreaterThan 7
GreaterThanOrEqual 8
LessThan 9
LessThanOrEqual 10
IsEmpty 11
IsNotEmpty 12

Feedback

You can give us your feedback through our GitHub repo by filing a new Issue or starting a new Discussion.


Or you can review / edit this page on GitHub.


Or you can review / edit this component on GitHub.

  • On this page