Search code examples
angularngx-datatable

Ngx-datatable cellClass


I'm trying to add a class to my cells in my ngx-datatable.

columns.push({ 
    cellTemplate: this.bodyPositionsTmpl, 
    cellClass: 'test', 
    headerTemplate: this.headerPositionsTpl, 
    name: 'Employments', 
    width: this.planningGridColumnWidths.position, 
    frozenLeft: true, 
    frozenRight: false 

});

However when I inspect my elements I dont the see the class added:

<datatable-body-cell ....... class="datatable-body-cell sort-active">

Should it not be present here?


Solution

  • It does work just as it should. I just added the class the wrong place. Sorry!