accessing group by value in RadGrid footer

4 posts, 0 answers
  1. NVB
    NVB avatar
    39 posts
    Member since:
    Apr 2009

    Posted 21 May 2012 Link to this post

    I am using Radgrid  and  have the following situation.
    First GroupBy is  Product and with in product it is grouped by City 

    PRODUCT Part A Part B
    Produc AA
    City:  New York
     Conractor 1 10 20
    Cotnractor 2 12 8
    Cotnractor 3 22 20
    City Total 44 48
    Cotnractor3 22 12
    contractor8 11 33
    Contactor 10 24 10
    City Total 57 55
    Prodcut Total 101 103

    Eveything works fin about the total and also I am inserting the labels accordingly in the group footer.

    I need to make my group footer more readble i.e it should say  NewYork City Total and Chicago City Total  in the inner group
    and  it should say Product AA Total for outr group  rather that standard label

    How do I access the groupby value from its Groupfooter.

    Thanks for you help

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 May 2012 Link to this post


    Try the following code snippet to access the GridGroupFooterItem.

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
     if (e.Item is GridGroupFooterItem)
       GridGroupFooterItem item = (GridGroupFooterItem)e.Item;
       string text=item["UniqueName"].Text;

  3. NVB
    NVB avatar
    39 posts
    Member since:
    Apr 2009

    Posted 22 May 2012 Link to this post

    Thanks for the reply

    I am getting space(&nbsp) when I read the column  and not the column values

    FYI : I am grouping first on Product and next grouping would be city and those are displayed only in group header  and column  are not displayed. Should I be doing something else in 'Product' and 'City' Column to be avaialbe in group footer

    I am using though it is fine if you can provide c#)

  4. Daniel
    Daniel avatar
    4949 posts

    Posted 25 May 2012 Link to this post


    I have attached a simple demo (C#) to this post.
    Hope this helps.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top