How to align footerTemplate values ​​in a kendo grid?

I have a kendo grid, and I use footerTemplate to find the sum of the values ​​in the grid. I have aligned the column values ​​in the grid successfully. My question is how to align values ​​in footerTemplate. Below is the code I use

{ field: "covered_amount", width: "150px", title: "Covered", sortable:false, attributes: { style:"text-align:right;" }, footerTemplate:"#= sum # " }, 

Any help is greatly appreciated.

+6
source share
1 answer

Define the footer template as:

 footerTemplate: "<div style='float: right'>#= sum #</div>" 

or

 footerTemplate: "<div style='text-align: right'>#= sum #</div>" 

and you can even format it with kendo.toString, Example:

 footerTemplate: "<div style='float: right'>#= kendo.toString(sum, 'c2') #</div>" 
+13
source

All Articles