Summary rows on multiple group levels

6 posts, 1 answers
  1. Allan
    Allan avatar
    3 posts
    Member since:
    Oct 2015

    Posted 05 Oct 2015 Link to this post

    I am working on rewriting our grid reporting system using the Telerik GridView. I have run into one thing I have no been able to do. When I group a report, I need to show a summary row for all group levels. I have attached an example of what I need to do. In it I am grouping on two columns: View & User Id. I show a summary row for each user (pink) and then another summary row for each view (blue). 

    I have tried to do the same thing with the gridview but i have  only been able to show a summary row for the lowest level group. 

     Does any one have an suggestions on how to do this?

     

     

     

  2. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 07 Oct 2015 Link to this post

    Hi Alan,

    Thank you for writing.

    I believe that the following KB resource implementing custom summary cells could help you in achieving your task: http://www.telerik.com/support/kb/winforms/gridview/details/gridview-with-visible-summary-cells-in-a-collapsed-group.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Allan
    Allan avatar
    3 posts
    Member since:
    Oct 2015

    Posted 07 Oct 2015 in reply to Hristo Link to this post

    Yes, that is exactly what I was looking for. I added the sample code to my program and it worked.

    I just have one question. I can see that the group summary is actually being placed in the summary header. This is a good trick. But this means that the summary ends up on top of the group. I actually want it on the bottom. Is it possible to create a new row instead of using the group header and have that row at the end of the group. This would match what I am currently doing.

  5. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 08 Oct 2015 Link to this post

    Hello Allan,

    Thank you for writing.

    In order to achieve this task you can add the summary row to the bottom of the grid when it is grouped. In order to make this work, you would also need to change the custom GridGroupContentCellElement  so that it performs the required calculations according to a row in the bottom.

    I am sending you attached a modified version of the project as well as a gif file showing the result on my end.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Allan
    Allan avatar
    3 posts
    Member since:
    Oct 2015

    Posted 08 Oct 2015 in reply to Hristo Link to this post

    That is getting closer. But I also need to move the summary row of the level 1 group to the bottom. This is the tricky part. Is it possible?

     I have attached a diagram to show what I mean.

     

    Thanks ..

  7. Answer
    Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 09 Oct 2015 Link to this post

    Hello Allan,

    Thank you for writing back.

    With the current implementation, that would not be possible. As you have noticed, we are using the GridGroupContentCellElement to host the custom cells providing the information for the summaries. The location of this cell is more or less static while the inner groups are created dynamically according to the rows in the inner view templates. 

    In the example, I last sent you, these items are moved on the bottom when the group is expanded. If it is collapsed and the items are moved to the bottom they will be easily mistaken with the summaries of the other groups.

    I hope this information is useful. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready