Rendering Options Overview
Risksheet offers two approaches for custom data rendering:| Approach | Property | Editable | Rendering Location |
|---|---|---|---|
| Client-side renderer | cellRenderer | Column remains editable | Browser (JavaScript) |
| Server-side renderer | serverRender | Column becomes read-only | Server (Velocity script) |
Step 1: Add a Client-Side Cell Renderer
Define a custom renderer function in thecellRenderers section and reference it in the column configuration:
Cell renderers (
cellRenderer) replace the entire cell display logic. Cell decorators (cellDecorators) add CSS classes to cells without changing their content. Use renderers for custom HTML; use decorators for conditional styling.Step 2: Add a Server-Side Rendered Column
For complex rendering that requires access to Polarion data relationships or cross-item queries, useserverRender with a Velocity script:
Step 3: Use Cell Decorators for Conditional Formatting
Cell decorators apply CSS classes to cells based on their values. Define them in thecellDecorators section:
info.value (the cell’s current value), info.cell (the DOM element), and info.item (the full row data).
Step 4: Combine Formulas with Decorators
A common pattern is using a formula to compute a value and a decorator to style it:Verification
Save the configuration and reload your Risksheet. You should now see cells with custom rendering applied. For cell decorators, verify that the conditional CSS classes are applied by checking that cells display the correct background colors based on their values.See Also
- Apply Conditional Formatting — style-based formatting
- Configure Cell Styles — CSS class definitions
- Customize Link Rendering — customize how links display
- Create Custom Renderers — advanced renderer patterns
- Configure Calculated Columns — formula-driven columns
Sources
Sources
KB Articles
- Render column with custom data
- Show ID and Title in one column for downstream items
- Display Sub-columns for multiItemLink columns
- Customize the way Item Links are rendered
- Collect multiple link columns into one column
CellPreviewFormatter.tsExportToPdf.tsPolarionAppConfigManager.javaAppConfig.tsAppConfigHelper.ts