Change treetable group row css

On a treetable using scheme.group feature, what is the recommended way to set a custom and possibly dynamic css class to the group row cells ?
I’ve tried setting obj.$group in scheme.$change but it’s not called for grouped rows : http://webix.com/snippet/4994e5d5

I’ve also tried on data->onGroupCreated event but it’s not called when groups are created by scheme.$group definition.

Thanks for your help

Hi,

You can add row css in the ready handler: http://webix.com/snippet/b934868e

But this handler will be called once, when the data has been loaded and processed by the scheme. If you ungroup this data and group in again, all styling will be lost.

To make styling persistent, you can either apply it within the column template by wrapping value into another div http://webix.com/snippet/3c9e1a42

Or, define a cssFormat function for the column (better): http://webix.com/snippet/c1d17ef7

Thanks !
“ready” way is fine for me