Tring to right align the header and data in selected columns in a grid as follows
<kendo-grid-column field="outstandingValue" title="Outstanding Value" width="100" [style]="{'text-align': 'right'}" [headerStyle]="{'text-align': 'right'}" [filterable]="false">
<ng-template kendoGridHeaderTemplate>
Outstanding Value
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
{{dataItem.outstandingValue | currency : 'GBP'}}
</ng-template>
</kendo-grid-column>
The data is right aligned but the header styling does not work?
I have the same problem, here is just an example forked from the Docs page with header align style change.
https://stackblitz.com/edit/angular-9eus2w-19phva?file=src%2Fapp%2Fapp.component.ts
Doesn't work for me, due to "k-link" span injected into the header with display: flex CSS attribute.
Hi Sergei,
To right align the Kendo UI Grid header text, use the justify-content property as seen below:
<kendo-grid [data]="gridData"> <kendo-grid-column field="ProductName" [headerStyle]="{ justifyContent: 'right' }" > </kendo-grid-column> </kendo-grid>
I have updated the StackBlitz example with the justify-content property and the header text is aligned to the right.
I hope this helps. Let me know if I can further assist you.
Regards,Hetali
Progress Telerik