Prerequisites
Before you begin, locate yourrisksheet.json configuration file. See Find Configuration Files for guidance.
Configuration Steps
1. Set the Row Header Renderer
Open yourrisksheet.json file and configure the headers.rowHeader.renderer property to reference your custom decorator function:
rowHeaderRpnNew function for styling row headers.
2. Define the Cell Decorator Function
Add your styling function to thecellDecorators section:
- Retrieves the
rpnNewfield value from the row usinginfo.item['rpnNew'] - Applies different CSS classes based on risk thresholds:
rowHeadRpn1for low risk (1-150)rowHeadRpn2for medium risk (151-250)rowHeadRpn3for high risk (251+)
Row header decorators use
info.item['fieldName'] to access row data, not info.value. The row header doesn’t have a single bound field, so you must explicitly reference the field you want to evaluate.3. Define the CSS Styles
Add style definitions to thestyles section. This example uses colored left borders:
Row Header Styling Flow
Common Patterns
Enum-Based Row Styling
Style row headers based on enumeration field values:Multi-Field Conditional Styling
Combine multiple field values to determine styling:Calculated Field Styling
Use calculated or formula column values for styling:Visual Styling Options
| Style Property | Use Case | Example |
|---|---|---|
border-left | Risk level indicator | 7px solid #B0D444 |
background-color | Full cell highlighting | #f8eae7 |
color | Text color change | #ab1c00 |
font-weight | Emphasis | 600 or bold |
font-style | Visual distinction | italic |
Verification
- Save your
risksheet.jsonconfiguration - Upload the configuration file (if using document/template attachments)
- Refresh the RISKSHEET widget
- You should now see row headers styled with colored borders or backgrounds based on the configured field values
- Change a field value (e.g., update
rpnNew) and verify the row header styling updates accordingly
Troubleshooting
Row header styles not displaying:- Verify
headers.rowHeader.renderermatches the decorator function name exactly - Confirm the decorator function is defined in the
cellDecoratorssection - Check that the field name in
info.item['fieldName']is correct and exists - Ensure CSS class names match between the decorator and
stylessection
- Verify the field is correctly populated in work items
- For calculated columns, ensure the formula executes correctly
- Check that the field ID matches the column binding name
- Use
wijmo.toggleClass()instead of direct DOM manipulation - Avoid setting inline styles directly on
info.cell - The grid reuses cells during scrolling, so class toggling is required
- Open Polarion Administration → Enumerations
- Check the exact ID values for enum options
- Use the ID in decorator logic, not the display name
See Also
- Configure Cell Styles
- Apply Conditional Formatting
- Cell Decorators Reference
- Configure Calculated Columns
- Risksheet.json Format
Sources
Sources
KB ArticlesSupport TicketsSource Code
risksheet.jsonAppConfig.tsExportToExcel.tsAppConfigHelper.tsSheetConstants.ts