Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3914
Sorting using LevelSortDirection does not seem to work.
posted

Hi,

I just upgraded to the latest WPF11.2 Service Release 2125.

I have date levels as follows:

HierarchyDescriptor dateTimeDescriptor = new HierarchyDescriptor { AppliesToPropertiesOfType = typeof(DateTime) };
                            int iDates = 1;
                            dateTimeDescriptor.AddLevel<DateTime>(dt => "AllPeriods", "All Periods");
                            if (IncludeYears)
                            {
                                dateTimeDescriptor.AddLevel<DateTime>(dt => dt.Year, "Years");
                                iDates++;
                            }
                            if (IncludeSemesters)
                            {
                                dateTimeDescriptor.AddLevel<DateTime>(dt => dt.SemesterShort(), "Semesters");
                                iDates++;
                            }

                            dateTimeDescriptor.AddLevel<DateTime>(dt => dt.Date, "Dates");

Also I added to default sort directions:

LevelSortDirection d = new LevelSortDirection();
                            d.LevelUniqueName = "AllPeriods";
                            d.SortDirection = ListSortDirection.Ascending;
                            flatDataSource.LevelDefaultSortDirections.Add(d);

 

What am I doing wrong. 

Thanks 

Sangeetha