Keep group footer visible

3 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 22 Jul 2009 Link to this post


    it's the first time for me that I use RadGrid with grouping.
    From a competitors product I know a view where I can show aggregates in the header.
    Without (a lot since my columns are dynamic) code behind I see no way to achieve this with RadGrid.

    The idea is simple - let's say I have product sales and group them by employee (drag this to the grouping section).
    Now (unluckily) I get the expanded view of my items.
    But (with code behind) I can change this - as well as I can remove (code behind) grouped fields from the columns.

    Let's stay on the default.
    I get a footer with my aggregates (in my case about 20 columns - assume "product groups").
    So this looks great by theory - in fact I have to scroll for (about) 200-300 rows to find the footer.
    Typically you scroll to fast - and oversee it :)

    Anyhow - the first important information is in the group footer - there my customer can see "this employee sold only 10 of... but 300 of..."

    The problems:
    a.) footer is hard to find
    b.) footer is hidden when you collapse the grouping.

    The best way would be some "Show aggregate in GroupHeader" property.
    But I found the group header is a single TD spanning all the columns.

    The other solution would be to keep the footer visible when the group is collapsed.
    But I found no way to achieve this.

    I hope you understand my (my customers) needs.
    Grouped view - with Aggregates visible when the group is collapsed.


  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 28 Jul 2009 Link to this post

    Hello ManniAT,

    You can display the results from aggregate functions as part of the grid header by defining appropriate declarative or programmatic group expressions. See the following topics from the RadGrid online documentation for more details:

    Alternatively, you can modify the result values or format them in a different than the default style as shown in these samples:

    I hope that these approaches will help you implement the grouping presentation you are after.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 28 Jul 2009 Link to this post

    Hi Sebastian,

    as I wrote I knew those solutions.
    BUT - a header like Emloyee: Sepp; Sum Products: 33,3; Average Tax: 17,8; Number of XXX: 44; is almost useless in the scenario where I have 20 fields.
    In a footer I have table cells (while the header is one single TD). So the aggregates are in the specific column.
    This has two features:
    a.) Easily to locate
    b.) Due to a.) it saves a lot of space.
    --I don't have to write Average Tax - since the value is in the Tax column a simple Avg: is enough.

    Anyhow I solved the things with a second level of hierarchy.
    The user can not drag columns to group - instead I provide "Command buttons" like "group by site" "Group by region" and than I add a virtual level of hierarchy (from the database) which brings a record which holds the aggregated values.
    Expanding this brings the detail records.

    Thanks for your help

Back to Top