I am unable to set Header cell style for ngx-datatable
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
unable to set Header style for ngx-datatable .datatable-header-cell{ color :green }
HTML
<ngx-datatable id =“ngxdatatable” class=‘material’
[rows]="rows"
[rowHeight]="20"
[columns]="columns"
[columnMode]="'force'"
[scrollbarV]="true"
[scrollbarH]="true"
[headerHeight]="30"
[footerHeight]="50"
[limit]="35"
(page)="onPage($event)">
</ngx-datatable>
but still style is not applied, data table still showing with default style color.
Please Help.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Fix header in ngx-datatable - Stack Overflow
I need to have a table with fixed header and scroll-able content. Below is the code : <ngx-datatable [rows]="qrCodes" class="material qr ...
Read more >swimlane/ngx-datatable - Gitter
Hi all, I modified the style for the datatable-body-cell-label , which applies to the element holding the text inside a cell, to allow...
Read more >swimlane/ngx-datatable - npm
Handle large data sets ( Virtual DOM ) · Expressive Header and Cell Templates · Horizontal & Vertical Scrolling · Column Reordering &...
Read more >Creating an Ionic Table With ngx-datatable - Devdactic
If you are working with a lot of data you might have encountered the problem of presenting this data in an Excel like...
Read more >Themeing - ngx-datatable - GitBook
Out of the box, the data-table is not styled. · There is a separate material theme distributed with data-table. · This is a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Angular’s default view encapsulation for components is
Emulated
to mimic a shadow DOM behavior effectively scoping a component’s CSS within that component only.To get around this, you could place that CSS into your global styles. Alternatively, you can use the
:host
and/deep/
selectors provided by Angular to style thengx-datatable
, or just change your component’s view encapsulation toViewEncapsulation.None
. See https://angular.io/guide/component-styles for more details.You might have to be more specific with that selector though. Something like
should work after getting around the view encapsulation.
I had a problem adding styles to the table. I added below in my component @Component({ … encapsulation: ViewEncapsulation.None, }) this takes my custom styling files