Understanding Conditional Formatting
Conditional formatting in Nextedy RISKSHEET requires three configuration sections working together:Configure Conditional Cell Formatting
Step 1: Reference the Decorator in Your Column
Add acellRenderer property to the column definition:
Step 2: Define the Cell Decorator Logic
In thecellDecorators section, create a JavaScript function that applies CSS classes based on value thresholds:
Step 3: Define the CSS Styles
In thestyles section, define how each class should appear:
Access Cell Data in Decorators
The decorator function receives aninfo object with access to:
| Property | Description | Example |
|---|---|---|
info.value | Current cell value | info.value > 100 |
info.item['fieldId'] | Any field in the current row | info.item['severity'] |
info.cell | The DOM cell element | $(info.cell).toggleClass(...) |
Example: Multi-Condition Formatting
Highlight cells based on multiple field values:Conditional Formatting Decision Matrix
| Value Range | CSS Class | Visual Result |
|---|---|---|
| RPN 1-150 | rpn-low | Green background |
| RPN 151-350 | rpn-medium | Yellow background |
| RPN 351+ | rpn-high | Red background |
| Status = closed | completed | Strikethrough |
| High risk + open | urgent | Bold red border |
Example: Row Header Conditional Formatting
Apply conditional styling to the row header column to create a visual risk indicator:Verification
You should now see:- Cells displaying different background colors based on their values
- Styles updating automatically when cell values change
- Visual risk indicators helping you identify high-priority items
See Also
- Cell Decorators Reference — Complete decorator API documentation
- Configure Cell Styles — Static cell styling options
- Configure Row Header Styles — Row header conditional formatting
- Configure Item Colors — Item-level color configuration
Sources
Sources
KB ArticlesSupport TicketsSource Code
AppConfig.tsrisksheet.jsonCellPreviewFormatter.tsCellEditorFormatter.tsExportToPdf.ts