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

Change alignment of grid column header / footer

1 Answer 1159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Veteran
Erik asked on 31 May 2020, 05:56 AM

Hi,

I have a sub-grid which includes a column with aggregate values (sum).

columns.Bound(c => c.TotalAmount).Format("{0:C2}").HtmlAttributes(new { style = "text-align: right;" })
    .ClientGroupHeaderColumnTemplate("Sub-Total: \\#=kendo.format('{0:C2}', sum)\\#")
    .ClientFooterTemplate("Total: \\#=kendo.format('{0:C2}', sum)\\#");    

 

Cf. screen shot (attached) to see how this displays.

How can I apply the column right-alignment to the column group header and footer as well?

Thx,

Erik

1 Answer, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 03 Jun 2020, 06:11 AM

Hi Erik,

 

You can achieve this requirement using CSS:

    <style>
      .k-grouping-row td:last-of-type{
        text-align: right;
      }
      .k-group-footer td:last-of-type{
        text-align: right;
      }
    </style>
Here is a live sample for demonstration:
https://dojo.telerik.com/IsoWAqUc

I hope this will prove helpful.

 

Regards,
Eyup
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Erik
Top achievements
Rank 1
Veteran
Answers by
Eyup
Telerik team
Share this question
or