Hi
I would like to use the GroupBy header row to only sort data (using several columns).
Basically, I want to display only the children rows after the group by (that is, if I'm not wrong, a sort).
So, is there any way to do something like :
1 - catch the events "a column has been added/removed/moved in the groupby header",
2 - then do the sort and cancel the classic groupby operations ?
Thanks
Hi,
You can use the BeforeSortChanged event to catch and modify the sorting that is being done. But I'm not sure I understand what you want to do here. Are you saying that when the user drags a column into the GroupbyBox, you don't want to group by that column, but just sort the rows instead? That seems like a very strange UI... but it is possible to do.
Hi Mike
Yes this is exactly what I want to do : when the user drags a column into the GroupbyBox, just sort the rows.
This is because our users can sort following quite a large number of columns, and I found this way quite easy and visual.
Can I also change the default text of this header : "Drag a column header here to group by that column" ?
Well I can't do it.
If I manually sort and then cancel the "BeforeSortChange" event, the columns don't appear in the groupby header.
What I would like to do (but I did'nt find a way to do it) is either
- only display the children rows following a "group by"
- replace any "groupBy" columns by "sorted" columns but, still display these columns in the groupby header (which is then used only as a "sort header")
Warning said:- only display the children rows following a "group by"
There's no good way to do this. You might be able to acheive something close by setting both the MinHeight and the actual height of the GroupByRows to some small number like 1.
Warning said:- replace any "groupBy" columns by "sorted" columns but, still display these columns in the groupby header (which is then used only as a "sort header")
There's no way to do this. The only way to display a column in the GroupByBox is to group it.