Hi,
Is there a way to hide Half Year(H1, H2) and Quarter(Q1, Q2, etc) from date dimension in xamPivotGrid? We only want to show year, month, and day info for a date type dimension.
Thanks,
Joseph
Hi
You should create your own HierarchyDescriptor and exclude the levels that you dont want to be visible. Below is a snipet
HierarchyDescriptor dateTimeDescriptor = new HierarchyDescriptor { AppliesToPropertiesOfType = typeof(DateTime) }; dateTimeDescriptor.AddLevel<DateTime>(dt => SR.GetString("AllPeriods"), "All Periods"); dateTimeDescriptor.AddLevel<DateTime>(dt => dt.Year, "Years"); dateTimeDescriptor.AddLevel<DateTime>(dt => dt.SemesterShort(), "Semesters"); dateTimeDescriptor.AddLevel<DateTime>(dt => dt.QuarterShort(), "Quarters"); dateTimeDescriptor.AddLevel<DateTime>(dt => dt.MonthShort(), "Months");
pivotGrid.DataSource.HierarchyDescriptors.Add(dateTimeDescriptor);
RegardsTodor
Do you have a sample somewhere that shows how to do this in the XAML code?
It works. Thanks a lot.