headerStyle has no effect

1 Answer 114 Views
Grid
jan
Top achievements
Rank 1
Iron
jan asked on 24 Nov 2021, 03:13 PM

Hi,

I have a grid, where I add some columns with ngFor like this:


<kendo-grid-column
      *ngFor="let period of periods; index as i"
      field="p{{ i + 1 }}"
      title="{{ i + 1 }}"
      format="n0"
      filter="numeric"
      [style]="{ 'text-align': 'right' }"
      [headerStyle]="{ 'text-align': 'right' }"
    ></kendo-grid-column>

The 'periods' is just a simple array from 1 to 12. The issue is, that the header style isn't applied, the title isn't aligned to the right. And if I test this with other columns, the title isn't aligned too. Does this works only, if I use a 'HeaderTemplateDirective'?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 29 Nov 2021, 02:48 PM

Hi Jan,

The headerStyle option should always work, it is not limited to cases where the HeaderTemplateDirective is being used.

I was not able to reproduce the issue with this Stackblitz example, so would you please send us a Stackblitz example (or a sample project) where we can see the issue and investigation it further?

Thank you.

Regards,
Ivo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
jan
Top achievements
Rank 1
Iron
Answers by
Ivo
Telerik team
Share this question
or