Grid for Blazor - Customize the appearance of elements including row and cell values based on custom conditions
The Blazor Grid allows you to customize the appearance of individual UI elements based on custom conditions (conditional formatting).
This example customizes the appearance of Blazor Grid cells/rows in the following manner:
- Highlighted data cells:
UnitsInStock < 10
. - Strikethrough data rows:
UnitsInStock = 0
. UnitPrice
values are set to bold and colored based on the following conditions:-
If a price is lower than the average price, the font is set to red.
-
If a price is higher than the average price, the font is set to green.
The average price is calculated within the Blazor Grid's summary item (DxGridSummaryItem).
-