Say the user drags a column to the group by bar in a grid, they would then like to see the groups ordered by the biggest group (most rows) first and so on down to the smallest group.
Regards,
Jonathan
Hello Jonathan,
You would have to use 'GroupByEvaluator' property ,which is used for specifying a custom evaluator for group-by records which determines group breaks.
Here is the document with a sample application at:
https://es.infragistics.com/help/wpf/infragisticswpf.datapresenter~infragistics.windows.datapresenter.fieldsettings~groupbyevaluator
Thanks Divya,
I have read that link and it might be helpful, not sure yet, as it is a bit different to what I was after. But maybe with a bit of adaptation - like getting the counts first, making groups with appropriate name and then fitting individual values to groups.
I was trying to group in a normal way (distinct values) but sort/order the groups by the count of rows in the groups rather than by the value.
For example if I had a column called PREFIX with values A (10 instances), B (15 instances) and C (5 instances).
Then standard GroupBy would order them ABC or CBA (reversed)
But I would like to get BAC or CAB (reversed)
Bit caught up in another Infragistics issue at the moment, but that had better be a separate question.
All the best,Jonathan
OK, that's great thanks for providing a viable way ahead.
Hello,
This is not something inbuit .You would need to use GroupByEvaluator for your requirement. You can provide your own grouping logic by setting GroupByEvaluator property to an object that implements the IGroupByEvaluator interface.
I do have one sample, attached here ,not exactly same like you want but could help you to have basic understanding.
and would help in implementing your custom logic.
About the other question ,I am looking into it , and would update the post soon.
InfragisticsSampleTest.zip