How to add CssClass for nested childrows in wijmo

1.1k views Asked by At

I have a requirement to add cssClass for nested child rows. I can add class for parent row but how to add nested child rows.

this.dataGrid.rows[i].cssClass
1

There are 1 answers

0
assax24 On

You need to add an event handler for the formatItem event of FlexGrid and then iterate over all the rows and set their cssClass property.

JS:

grid.formatItem.addHandler((s, e) => {
    s.rows.forEach(r => {
        r.cssClass = 'custom-back';
    })
});

CSS:

.custom-back {
  background: rgb(18, 148, 148) !important;
}