Custom renderers sit between the data model and the grid display. When Risksheet renders a cell, it first applies built-in rendering for the column type, then invokes any custom renderer registered for that column binding.
risksheet.json Top Panel Template Grid Cell─────────────── ───────────────── ──────────"columns": [{ risksheetTopPanel.vm Rendered output "id": "severity", ──> <script> ──> with custom "cellRenderer": function renderSev HTML, styles, "renderSev" (grid, cell, item, and formatting}] value) { ... } </script>Configuration Implementation Display
Register a custom renderer on a specific column using the cellRenderer property in the column definition.
Name
Type
Default
Description
cellRenderer
string
undefined
The name of a JavaScript function registered on window.risksheet.cellDecorators that controls how the cell value is displayed. The function is invoked during cell rendering for every row in that column.
The row header (the leftmost fixed column showing row numbers) supports a custom renderer through the headers configuration.
Name
Type
Default
Description
headers.rowHeader.renderer
string
None
The name of a cell decorator function applied to row headers. Typically used to apply conditional styling based on row data (e.g., coloring row headers by RPN value).
Custom cell renderers are not applied during comparison mode. When viewing revision differences, cells use the standard comparison highlighting instead of custom rendering logic.
Each custom renderer function receives four parameters:
Parameter
Type
Description
grid
object
The grid control instance, providing access to grid-level settings, column definitions, and data operations
cell
HTMLElement
The DOM element for the cell being rendered. You can modify its innerHTML, style, className, and child elements
item
object
The work item data for the current row. Access any bound field value via item['fieldName']
value
any
The current cell value after any formula calculation. May be null or undefined for empty cells
Define renderer functions in the Top Panel Template using a <script> block, or register them on the global window.risksheet.cellDecorators object from any script loaded into the page.
Risksheet applies built-in rendering for standard column types before custom renderers execute. Understanding these defaults helps you write renderers that augment rather than conflict with standard behavior.
Column Type
Built-In Rendering Behavior
Item link (isItemLink)
Displays as HTML hyperlink from the _link postfix property. New items (ID starting with *) show an asterisk prefix with a special CSS class. Supports custom property bindings for display.
Multi-item link (multiItemLink)
Parses JSON array with id, label, and title properties. Each link renders as a separate <div> element with a title tooltip showing the full ID and title. Hidden bracket separators between items support clean copy/paste behavior.
Multi-enum (multiEnum:id)
Selected values render as span.multi-enum-list containing span.multi-enum-item elements. Reads enum options from configuration and renders selected values with their display labels. Falls back to raw value if the enum option is not found.
Date (date)
Parses date strings in YYYY-MM-DD format to local time Date objects. Formats the date according to the column’s format property using the Globalize library and the configured global.culture locale.
Task link (isTaskLink)
Displays HTML content from the _link postfix property. Rendering behavior matches item links but is specific to task relationships.
Boolean (boolean)
Renders as a checkbox representation.
Server-rendered (serverRender)
Displays server-generated HTML content as-is without client-side modification.
HTML content (isContentHtml)
Cell content is rendered as HTML rather than plain text.
Formulas execute during cell rendering and produce the value parameter passed to custom renderers. This means your renderer receives the calculated result, not the raw stored data.
Property
Type
Default
Description
formula
string
undefined
Name of a formula function defined in the formulas object. Formulas execute with info.item context, returning the calculated value. Columns with formulas are automatically read-only.
When a formula result differs from the stored value, the system can mark the item as edited. Formula changes respect the readOnly column setting. The formula mark changes behavior enables tracking of calculated field changes for audit purposes.
Cells are visually marked as read-only based on cell-level permissions. The readonly CSS class is applied to indicate non-editable cells. Read-only state is determined by checking the following conditions:
Source
Condition
Column readOnly
The column definition has readOnly: true
Formula columns
The column has a formula property set
Server render columns
The column has a serverRender property set
System fields
System-managed columns (ID, author, created)
Item permissions
systemReadOnly or systemReadOnlyFields includes the column binding
Task permissions
systemTaskReadOnly or systemTaskReadOnlyFields for task rows
Item state
Task attributes on items without tasks are read-only
When a comparison manager is configured (viewing changes against a previous revision or baseline), Risksheet applies specialized cell highlighting that overrides custom renderers.
Highlight Type
Applies To
Description
Added rows
Entire row
New rows not present in the compared revision. Row background indicates addition.
Removed rows
Entire row
Rows deleted since the compared revision. Row background indicates removal. Ghost items (deleted in one revision) are handled separately.
Modified cells
Individual cell
Changed property values between revisions. Cell background highlights the change. Tooltips explain the modification.
Not compared
Individual cell
Columns that cannot be meaningfully compared (e.g., formulas, server-rendered content).
Downstream added
Task columns
New downstream task items linked to the master work item since the compared revision.
Downstream removed
Task columns
Downstream items removed since the compared revision.
Downstream modified
Task columns
Property changes in existing downstream items. Tooltips identify the specific downstream item and change type.
During baseline comparisons, sorting operates on the baseline snapshot values rather than current values, except for system identity fields (systemItemId and systemItemRevision) which always refer to the current item.
The following example shows a full custom renderer setup for an FMEA risksheet with severity badge rendering, RPN color coding via row headers, and a custom risk acceptance indicator.Top panel template (risksheetTopPanel.vm):