Dynamic colour coding of grid

That’s it! I’ve got it working now.

See this screen grab:

The green highlight is based on a referenced value that is an average of sales at the bottom of the grid at $28.27.

All values greater than this will be colorized. And it will change dynamically upon the next calculation. It can even change in real-time is you add the auto-refresh keyword _ar

All this is done with a string added to the view’s description, as seen here:

The string goes like this:

_cfv=[Sales, gt,ktlRefVal,yellow,darkgreen], [ktlRefVal,#view_219 .kn-table-totals:last-of-type td:nth-child(2)]

It would also work with another view, like a details view or anything else. Just change the CSS selector following the ktlRefVal option.

I will release this shortly in version 0.13.11 and update the documentation.

Cheers, enjoy!
Norm

3 Likes