Hello --
I have a xamdatagrid and allowing the user to group on any column. One column, "type" is what I want displayed when they group on that column, but I want to it to be grouped by using a different value, typeID. So... user drags "Type" column to group by area, users sees "Type" groupings (while behind the scenes it actually grouped on TypeId. Yes, I expect the same "Type" to be listed more than once.
This does not seem to work:
Grid_Grouping(object sender, GroupingEventArgs e) {
int index = e.Groups.ToList().FindIndex(x => x.FieldName == "Type");
if (index != 1) e.Groups[index] = new FieldSortDescription("TypeID", Ascending, true); } }
Hello Daniel,
Thank you for your post. I have been looking into it and I created a sample project for you with the fucntionality you want. Basically I used custom GroupByEvaluator where the grouping of City Field is based on Princode Field. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thanks for the quick reply Stefan! This works as you say and resolves my issue! I forgot about the GroupByEvaluator! :)
Cheers!
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.