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

Formatting Group Footer Text

7 Answers 524 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peterson Mwangi
Top achievements
Rank 1
Peterson Mwangi asked on 20 Jul 2010, 04:33 PM
Hi fellow coders,

Am using the radGrid to display grouped data. I also have aggregated data for the group (sum) on some columns. I would want to format the totals at the group footer to my own liking, e.g. make font bold, use different background color, etc. How do I go about formatting the group footer text?

Please see attached image for some visual explanation.

Thanks.

7 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 20 Jul 2010, 06:28 PM
Have you tried setting the FooterStyle setting of your RadGrid? I assume that would take care of your formatting needs.

I hope that helps.
0
Peterson Mwangi
Top achievements
Rank 1
answered on 20 Jul 2010, 06:48 PM
Hi Cori,

Thanks for your response. I have tried this:
<FooterStyle Font-Bold="true" />
but it doesn't seem to work.
0
Quinten
Top achievements
Rank 1
answered on 20 Jul 2010, 10:37 PM
I am having the same problem.  The FooterStyle directives only seem to have an effect on the overall grid footer, not the group footers. 

Is there any way to style the group footer?  I have tried it declaratively and programatically, to no avail (yet).
0
Princy
Top achievements
Rank 2
answered on 21 Jul 2010, 06:03 AM
Hello,

Try the following code snippet to make the font bold in GroupFooter.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
      if (e.Item is GridGroupFooterItem)
       {
           GridGroupFooterItem groupFooter = (GridGroupFooterItem)e.Item;
           groupFooter.Style.Add("font-weight", "bold");           
       }
  }

Thanks,
Princy.
0
Peterson Mwangi
Top achievements
Rank 1
answered on 21 Jul 2010, 07:03 AM
Hi Princy,

Thank you so much for your assistance!!! Works like a charm!

Cheers,

Peterson.
0
Quinten
Top achievements
Rank 1
answered on 21 Jul 2010, 02:57 PM
Fantastic!  Thanks, Princy!  Worked perfectly.
0
Mike
Top achievements
Rank 1
answered on 30 Apr 2013, 06:53 PM
I'm not sure Telerik pays Princy enough!  He always has a solid answer!  Once again Thank you Princy!
Tags
Grid
Asked by
Peterson Mwangi
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Peterson Mwangi
Top achievements
Rank 1
Quinten
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Mike
Top achievements
Rank 1
Share this question
or