I am attempting to set the ordering for a hierarchy using OrderByKeyExpression as in the example:
http://help.infragistics.com/Help/NetAdvantage/WPFDV/2011.1/CLR4.0/html/xamPivotGrid_DV_Sorting_Rows_and_Columns.html
However, even with DataSourceBase.PreserveMembersOrder set to false, the custom ordering is ignored. Is there perhaps something else I need to do to enable custom sorting?
Many thanks
Hello Matthew,
You can add the following code before you set the XamPivotGrid's DataSource:
flatDataSource.LevelDefaultSortDirections.Add(new LevelSortDirection { LevelUniqueName = "[Investment].[Investment].[Order]", SortBehavior = LevelSortBehavior.System });
Hope this helps you.
Version 12.2.20122.2022
.NET Version v4.0.30319
Which version and build of the control you are working with, because there were such issues with some of the previous builds we already have fixed.
Thanks.Plamen.
Dear Stefan
Thank you for your quick reply. On running the sample project and expanding the investment hierarchy the columns are ordered as follows:
1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 4 5 6 7 8 9
They do not appear to be following the integer ordering specified. Furthermore, if the OrderByKeyExpression assignment is removed from the code, the ordering of columns remains the same.
Thanks again for your help
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.