Hello,
I have a issue with header order, can I order a DateTime field?
I'm using 14.1, but I tested in 15.1 and did not fix it.
Code:
dimMetadata = new DimensionMetadata(); dimMetadata.SourcePropertyName = "DT_FIELD"; dimMetadata.DisplayName = "Date"; dimMetadata.AggregatorType = AggregatorType.None; dimMetadata.AutoGenerateField = false; dimMetadata.DimensionType = DimensionType.Dimension; cubeMetadata.DimensionSettings.Add(dimMetadata);
outputFlatDataSource.CubesSettings.Add(cubeMetadata);
Thanks,
Fernando
Hello nandoviski,
Thank you for your post.
The code that you have provided will not reorder the DateTime field in the XamPivotGrid. What you need here is a sorting operation. You can apply a sort to a FlatDataSource by following the instructions presented here: http://help.infragistics.com/doc/WPF/2014.2/CLR4.0/?page=xamPivotGrid_Sorting_Rows_and_Columns.html.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hello Andrew,
Thanks for your reply.
Can I a sorting operation if I am using dynamic class?? Because I don't know what kind of object it will populate.
For example, you are using "Expression<Func<Sale, String>>" in the sample, but I don't have the class "Sale", for me, this class is dynamic (I'm using 'DynamicTypeBuilder').
Can I do that?
Thank you.