Formatting Group Footer Text

8 posts, 0 answers
  1. Peterson Mwangi
    Peterson Mwangi avatar
    10 posts
    Member since:
    Mar 2010

    Posted 20 Jul 2010 Link to this post

    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.
  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 20 Jul 2010 Link to this post

    Have you tried setting the FooterStyle setting of your RadGrid? I assume that would take care of your formatting needs.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peterson Mwangi
    Peterson Mwangi avatar
    10 posts
    Member since:
    Mar 2010

    Posted 20 Jul 2010 Link to this post

    Hi Cori,

    Thanks for your response. I have tried this:
    <FooterStyle Font-Bold="true" />
    but it doesn't seem to work.
  5. Chris May IT Team Lead
    Chris May IT Team Lead avatar
    31 posts
    Member since:
    Nov 2009

    Posted 20 Jul 2010 Link to this post

    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).
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Jul 2010 Link to this post

    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.
  7. Peterson Mwangi
    Peterson Mwangi avatar
    10 posts
    Member since:
    Mar 2010

    Posted 21 Jul 2010 Link to this post

    Hi Princy,

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

    Cheers,

    Peterson.
  8. Chris May IT Team Lead
    Chris May IT Team Lead avatar
    31 posts
    Member since:
    Nov 2009

    Posted 21 Jul 2010 Link to this post

    Fantastic!  Thanks, Princy!  Worked perfectly.
  9. Mike
    Mike avatar
    338 posts
    Member since:
    Jun 2008

    Posted 30 Apr 2013 Link to this post

    I'm not sure Telerik pays Princy enough!  He always has a solid answer!  Once again Thank you Princy!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017