Posted 14 September 2017, 12:12 pm EST
Hi guys!
I am trying to set the background color for specific column with the color picker (rgb). Since there is only cssClass available to modify the style of the column, I am wondering how can I achieve it with some “ngStyle” inputs? The grid is going to be pretty bit, therefore I think I can not use the cell template or?
So my code at the moment is:
<wj-flex-grid-column *ngFor="let column of columns" [binding]="column.binding" [dataMap]="column.displayValues" [width]="column.width" [cssClass]="'column-background-color-' + column.colorBackground + ' ' + 'column-foreground-color-' + column.colorForeground">
but I would like to have something like this: (check the ngStyle in the end)
<wj-flex-grid-column *ngFor="let column of columns" [binding]="column.binding" [dataMap]="column.displayValues" [width]="column.width" [cssClass]="'column-background-color-' + column.colorBackground + ' ' + 'column-foreground-color-' + column.colorForeground" [ngStyle]="{color: column.bgColor}">
The down side now is that I would have to use the predefined set of colors in css in order to be able to style the background color.
Is that even possible?
Thank you in advance!