This is a migrated thread and some comments may be shown as answers.

Select All pattern for groups in RadGridView

2 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 23 Sep 2011, 01:29 AM
Hi, 

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!

Thanks,

Sam

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Ivanov
Telerik team
answered on 27 Sep 2011, 02:06 PM
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.

Regards,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sam
Top achievements
Rank 1
answered on 28 Sep 2011, 06:30 AM

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,

Sam
Tags
GridView
Asked by
Sam
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Sam
Top achievements
Rank 1
Share this question
or