最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to right align values of footerTemplate in kendo grid? - Stack Overflow

programmeradmin0浏览0评论

I have a kendo grid and i am using footerTemplate to find the sum of values in the grid.I have aligned the values of columns in the grid successfully.My question is how to align the values in footerTemplate The following is the code i am using

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

Any help is much appreciated.

I have a kendo grid and i am using footerTemplate to find the sum of values in the grid.I have aligned the values of columns in the grid successfully.My question is how to align the values in footerTemplate The following is the code i am using

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

Any help is much appreciated.

Share Improve this question edited Dec 27, 2013 at 3:42 웃웃웃웃웃 asked Mar 20, 2013 at 10:16 웃웃웃웃웃웃웃웃웃웃 12k15 gold badges62 silver badges94 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 18

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 using kendo.toString, Example:

footerTemplate: "<div style='float: right'>#= kendo.toString(sum, 'c2') #</div>"
发布评论

评论列表(0)

  1. 暂无评论