5.20202.699
wijmo.knockout.grid Class wjStyle Wijmo API Class

wjStyle Class

KnockoutJS binding for conditional formatting of FlexGrid Column cells.

Use the wjStyle binding together with the wjFlexGridColumn binding to provide conditional formatting to column cells. For example:

<div data-bind="wjFlexGridColumn: {
        header: 'Change',
        binding: 'changePercent',
        format: 'p2',
        width: '*'
        },
        wjStyle: { color: getAmountColor($item().change) }"></div>

The wjStyle uses the same syntax as the native KnockoutJS style binding. In addition to the view model properties, the following observable variables are available in binding expressions:

$item
References the item that is bound to the current row.
$row
The row index.
$col
The column index.

Heirarchy

  • wjStyle