Hi
I've got a grid that contains some denormalized data: product, color, size. the combination of columns is unique thoug.The user can select from this grid(using a checkbox) the product variants she wants.
The problem I have is that there could be hundreds of variants and they want to select say just 1 color of a product(meaning all sizes with that color). So they need to go and click every row for that color.
Is there a way to use the grouping functionality combined with a checkbox at the group level that when checked will select all the group details?
Thanks,
Cosmin Onea
I'm sorry, but I do not understand what you are asking.
Thanks for the reply but this is not working as my scenario is slightly different, I want turn off some group based on one of the group selection.So check box I am selecting is at group level and the other checkboxes which i want to uncheck are also at same group level.
Let me know whether I am able to explain you.
Hi,
Okay.. assuming you are using the GroupBy sample I linked to above... you want to synchronize the checking of the groupby checkbox with the checkboxes in a particular column?
This sample is storing the Value of the CheckBox inside the Tag property of the GroupByRow. So all you would have to do is trap for the CellChange event on the grid so you can detect when the user changes a checkbox in the appropriate column. You will have to use the Text property on the cell instead of the value inside the CellChange event to determine the new value of the checkbox.
CellChange gives you the cell you are working with, so you can get the cell.Row and the Rows collection to which it belongs and the ParentRow, which is presumably a GroupByRow. Once you have the GroupByRow, you can set it's Tag property.
To get the display to update to reflect the new Tag, you have to dirty the UIElements of the grid:
grid.DisplayLayout.UIElement.DirtyChildElements()
I am new member of this community and I have used your class for adding group check box.But the problem I am having is I need to uncheck some check boxes at group level based on selection of one the check box at the group level.
Is it possible ?
Sounds like what you might want to use filtering. You could turn on the filter row and the user could just enter a 1 under product and RED under color and all other rows would be hidden.
To implement checkboxes on the group by rows, you would have to use the CreationFilter I linked to above.