Data control

DataControl

Filter and sort one table, then read it as grid rows, chart series or CSV.

Overview

DataControl wraps a DataTable for Blazor apps: filter and sort the rows once, then read them as grid rows, chart series, CSV or JSON. Use it when one data set, such as a list of orders, feeds several views, and when you need to know what users changed: IsDirty and GetChanges track edits. If you know pandas or the PowerBuilder DataWindow, the API will feel familiar: DataFrame, ConvertDtypes and a 1-based GetItem.

Examples

#Filter and sort once; a grid, a chart and a CSV follow

Type a DataView filter like Amount > 1000 or Customer LIKE 'A%' and pick a sort; grid, chart and CSV change together, and a bad expression is reported, keeping the old filter.

Order Customer Amount Open Ordered
A100Peppercorn1,280.50True9/2/2026
A101Marmalade845.25False9/5/2026
A102Puddleby2,210.00True9/9/2026
A103Thistlewood1,640.75True9/12/2026
A104Peppercorn420.00False9/15/2026
A105Marmalade1,995.10True9/19/2026
A106Puddleby760.40False9/23/2026
A107Peppercorn3,120.00True9/30/2026
8 rows
Amount by order
01000200030004000 A100A101A102A103A104A105A106A107
Order,Customer,Amount,Open,Ordered
A100,Peppercorn,1280.50,True,9/2/2026 12:00:00 AM
A101,Marmalade,845.25,False,9/5/2026 12:00:00 AM
A102,Puddleby,2210.00,True,9/9/2026 12:00:00 AM
A103,Thistlewood,1640.75,True,9/12/2026 12:00:00 AM
A104,Peppercorn,420.00,False,9/15/2026 12:00:00 AM
A105,Marmalade,1995.10,True,9/19/2026 12:00:00 AM
A106,Puddleby,760.40,False,9/23/2026 12:00:00 AM
A107,Peppercorn,3120.00,True,9/30/2026 12:00:00 AM

8 of 8 rows in view; Amount is Decimal, Open is Boolean, Ordered is DateTime.

Documentation

PropertyTypeDefaultDescription
TableDataTable—The underlying DataTable. Assigning a new one clears the selection and reapplies Filter and Sort.
Filterstring?nullDataView row filter expression applied to the current view.
Sortstring?nullDataView sort expression applied to the current view.
ShapeDataControlShape—Rows in the current view and columns.
Sizeint—Rows × columns of the current view.
Emptybool—True when the view has no rows or the table no columns.
ColumnsIReadOnlyList<DataControlColumn>—Name and type of each column.
DtypesIReadOnlyDictionary<string, Type>—Column name to CLR type.
RowCount / TotalRowCountint—Rows in the current view; rows in the table.
IsDirtybool—True while the table has uncommitted changes.
At / IatDataControlAtIndexer / DataControlIatIndexer—Cell by row label and column name; cell by 0-based row and column position. Both read and write.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.