Hello,
According to https://ko.infragistics.com/products/ignite-ui-angular/docs/typescript/classes/igxcolumngroupcomponent.html cellClasses is a supported property for the igx-column-group control.
When I attempt to apply a css class using this property though it is ignore. Here is a sample of my implementation:
<igx-column-group [header]="'Contact Name'" [cellClasses]="igx-thead_center-and-middle-text">
Am I missing something?
Thanks!
The cellClassses property works a lot like the ngClass directive. It expects an object where the keys are the style classes that are to be applied and the values are either simple Boolean values or a callback that returns a Boolean value.
You can check out this sample where you can see it in action.
In your case it will be [cellClasses]="{'center-and-middle-text': true}"
Thanks for the tip but that's not getting me anywhere either. I've tried it in the manners shown below based on your suggestion and the sample you provided. Neither way worked. The class just isn't getting applied.
Here is the class I'm trying to apply:
Class is found in component.scss
.igx-thead_center-and-middle-text { display: --webkit-box; -webkit-box-pack: center; -webkit-box-align: center; }
Here is the first way I tried it:
Applied in component.html
<igx-column-group [header]="'Contact Name'" [cellClasses]="{'igx-thead_center-and-middle-text': true}">
Here is the second way I tried it
Applied in component.ts
public theadCenter = { "igx-thead_center-and-middle-text": true };
<igx-column-group [header]="'Contact Name'" [cellClasses]="theadCenter">
Any other suggestions?
Thanks for the suggestion but your solution would apply that style to all objects that use those classes which if I"m not mistaken are all of the headers for any igxgrid.
I'm trying to apply a class to a specific cell in a specific grid. I'm not having an issue with the CSS values needed, my problem is that the class is not seen by the grid.
When I look at the grid via Chrome's debugger, the class isn't listed at all. If I manually add the class through the debugger it works fine.
Thank you for the assistance. This put me on the correct path.
Hi,
I updated the sample to apply all the headers that have