I need multi-column grouping, where multiple columns form a single groupbyrecord. currently, it appears that each sortdescription that has its IsGroupBy flag set to true creates a group record. I have the need to create a single group from multiple columns. A way to concatenate the sortdescriptions for grouping. Anybody done this yet, have a way to merge multiple groups in the same group tree?
There is no feature build into the XamdataGrid to do this.
However, you should be able to accomplish what you want by doing the following:
1. Set the XamDataGrid’s GroupByAreaLocation to ‘None’ to hide our grouping UI
2. The application can show its own UI for selecting groupby field criteria unless they are fixed in which case no UI is necessary.
3. Pick any Field in the FieldLayout’s Field’s collection (or add an Unbound field whose Visibility is set to Collapsed) and set its Settings.GroupByEvaluator to your implementation of the IGroupByEvaluator interface. The implementation of which will take into account the groupby criteria from 2 above.
4. Add a FieldSortDescription to the FieldLayout’s SortedFields collection for the field used in 3 above.
This is helpful, and it got me pointed in the direction I was looking for. I found that adding an unbound column, and a custom groupby evaluator works if I intercept the Grouping event, and redirect the grouping to my column, by basically concatenating the FieldSortDescriptors together in the Custom GroupByEvaluator. I can then build a custom group from multiple columns as they are added to the GroupByArea. Now I just have to save it so I can restore the custom grouping. Thanks, It got me going in the direction I needed.
Can you attach an image of dialog for which you wanted to achieve above mentioned functionality , because i think i also want to achieve the same thing.
Thanks for replying Stefan.
But i found solution. I had to use HeaderPlacementOnTop property in FieldLayoutSettings
Hello Shubham,
Could you please also attach a screenshot of the result you want to achieve, so I could be able investigate this further for you and see if the functionality you want is achievable?
Looking forward for your reply.