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

Footer Template - Right-Align values

2 Answers 74 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.
Christopher Ronak
Top achievements
Rank 1
Christopher Ronak asked on 13 Nov 2010, 12:09 AM
Hello, 
I'm using the new .FooterTemplate available on the grid. Is it possible to set the alignment of the footer? Here's the code I'm using. However, the currency values in the grid are correctly right-aligned, but the footer comes out left-aligned.
columns.Bound(x => x.TotalBillable)
               .FooterTemplate(() =>
                                       {%>
                                       <b style="text-align:right"><%= string.Format("{0:c}", Model.SummaryTotalRevenue)%> </b>
                                       <%})
               .Format("{0:c}").Title(ViewData["RevenueType"].ToString()).Width(80).HtmlAttributes(new { style = "text-align:right" });

Having these footer rows is an excellent addition to the grid, by the way. Thanks!

Chris

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 Nov 2010, 07:46 AM
Hi Christopher,

You may use FooterHtmlAttributes to change the footer's text alignment in the same way you have changed the item's one.

Regards,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rafael
Top achievements
Rank 1
answered on 31 Jan 2011, 01:32 PM
I am trying to update total value for nested grid this way
 .DetailView(detail => detail.ClientTemplate(Html.Telerik().Grid<mVacation>("<#= EmployeeId #>")
                    .Name("Vacations_<#= EmployeeId #>")
                    .Columns(columns =>
                    {
                        columns.Bound(v => v.VacDuration).Title("Duration").ReadOnly(true)

                            .FooterTemplate(() =>
                                       {%>
                                       <b style="text-align:right"><%= string.Format("{0:c}", new { iPuzzle.Models.mVacation.TotalVacationsPlanned })%> </b>
                                       <%});

but it doesn't work and I get exception
Who could advise what i am missing?
Tags
Grid
Asked by
Christopher Ronak
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Rafael
Top achievements
Rank 1
Share this question
or