This is a migrated thread and some comments may be shown as answers.

[Solved] ClientGroupFooterTemplate and applying HtmlAttributes to footer

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
klim
Top achievements
Rank 1
klim asked on 10 Apr 2011, 05:46 AM
I have been trying to get my client group footer to be right-aligned by setting a CSS class. In my experiments, it seems to work when I use FooterHtmlAttributes, GroupFooterTemplate, and Server binding. When I switch to ClientGroupFooterTemplate and Ajax binding. Is this a bug? What is the proper way to set attributes on client group footer template columns?

1 Answer, 1 is accepted

Sort by
0
ovidiaconescu
Top achievements
Rank 1
answered on 19 Mar 2012, 04:29 PM
You can put a div inside the ClientGroupFooterTemplate and the result is good enoguh.

 columns.Bound(o => o.Amount)
                    .Format("{0:n2}")
                    .Width(150)
                    .HtmlAttributes(new { style = "text-align:right; margin:12px; padding:5px;" })
                    .Aggregate(aggreages => aggreages.Sum())
                    .ClientGroupFooterTemplate("<div style=\"width:100%; text-align:right\">Total: <#= $.telerik.formatString('{0:n2}', Sum) #></div>"); 
                
Tags
Grid
Asked by
klim
Top achievements
Rank 1
Answers by
ovidiaconescu
Top achievements
Rank 1
Share this question
or