Data Grid Styling

Custom cell rendering, row styling, conditional formatting, loading and empty state templates, and row interaction customization for BbDataGrid.

Row & Cell Styling

Use RowClass for dynamic per-row CSS (e.g. highlight high-salary rows). Use CellClass on a column for static cell styling.

Conditional Cell Formatting

Use CellClassFunc to compute cell classes from the row item — ideal for flagging values that need attention. The result is composed with any static CellClass on the column.

Row Click & Context Menu

Use OnRowClick to respond to row clicks. Add RowContextMenu for a right-click menu — the grid provides the menu container, you just supply the items. The template receives DataGridRowMenuContext with the clicked item, selected items, and clipboard helpers like CopyToClipboardAsync, FormatRow, and FormatRows.

Loading State

Set IsLoading="true" with Items="null" to display a loading state. Use LoadingTemplate to customize the loading content — skeleton rows work well here.

Empty State

Use EmptyTemplate to display a message when the data collection is empty. Guide users on what to do next.