Select All pattern for groups in RadGridView

3 posts, 1 answers
  1. Sam
    Sam avatar
    67 posts
    Member since:
    Jun 2011

    Posted 22 Sep 2011 Link to this post


    We really need some guidance on this functional scenario:

    - We have a grid where each row has a checkbox column
    - Each group also has a checkbox 
    - The group checkbox should be checked if all the checkboxes for rows in the group are checked, otherwise it should be unchecked
    - Checking or unchecking the group checkbox sets all the rows to that value as well
    - Every time a row checkbox is checked, each parent group should also re-evaluate whether it needs to be checked or unchecked as well

    I've added a GroupDescriptor to create the group, and have specified the GroupHeaderTemplate to show a checkbox next to the group label, which is all good.

    However I'm really unsure how to implement the actual behaviour here (preferably using MVVM approach).

    A working sample would be greatly appreciated!


  2. Answer
    Ivan Ivanov
    Ivan Ivanov avatar
    1218 posts

    Posted 27 Sep 2011 Link to this post

    Hello Sam,

    I have prepared a sample project that illustrates such a scenario. Unfortunately, since there is a lot of interaction with visual elements at runtime, performance might prove to be an issue. The RadGridView in the attached project is grouped in three levels, but if you do not require nested grouping support, things would be much faster. Please, inform us whether this solution meets your requirements.

    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. Sam
    Sam avatar
    67 posts
    Member since:
    Jun 2011

    Posted 28 Sep 2011 Link to this post

    Thanks Ivan, this solution has given us enough guidance to do what we need.

    I noticed the performance problems in the sample, but we have managed to avoid those problems by constraining to a single group description.

    Thanks for your help,

Back to Top