Add support for Hours/Minutes/Seconds steps. Also, add a DayNumber option.
With the current implementation the top level header only visually appears as one cell, however it stretches the subheader column below (check PivotGrid(Now).png). Looking the attach file,now the XAML is following: <pivot:LocalDataSourceProvider.AggregateDescriptions> <pivot:PropertyAggregateDescription PropertyName="AccValue" CustomName="total"/> <pivot:PropertyAggregateDescription PropertyName="IncValue" CustomName="increased"/> </pivot:LocalDataSourceProvider.AggregateDescriptions> <pivot:LocalDataSourceProvider.ColumnGroupDescriptions> <pivot:PropertyGroupDescription PropertyName="SystemDeviceCode"/> </pivot:LocalDataSourceProvider.ColumnGroupDescriptions> the SystemDeviceCode column just use one column ,like the attach "PivotGrid(Now).png",when the text is long ,the first column "Total" is too wide . I hope like the attach "PivotGrid(desired).PNG",the SystemDeviceCode column can span two columns. and the data struct: public class DayStruct1 { public string HourNum { get; set; } public string SystemDeviceCode { get; set; } public double AccValue { get; set; } public double IncValue { get; set; } public DateTime Date { get; set; } }//
Currently when a header value is empty the displayed text is "(blank)" regardless of the application's culture. Localize this value or allow the developer to set this value more easily. If you want to manually localize the "(blank)" text you can define a RowHeaderTemplate and ColumnHeaderTemplate (or template selector) and replace the default text with its translation. You can do that via IValueConverter. (http://docs.telerik.com/devtools/wpf/controls/radpivotgrid/styles-and-templates/templating-cells#using-custom-cell-and-header-templates)
I want to create CustomDistinct aggregate, I did it successfully for LocalDataSourceProvider, and I need it also for QueryableDataProvider. See: http://www.telerik.com/forums/custom-aggregate-for-queryabledataprovider
I implemented it for me, but I will be glad to get it out of the box for all providers. public class ExtendableLocalDataSourceFieldDescriptionsProvider : LocalDataSourceFieldDescriptionsProvider { protected override ContainerNode GetFieldDescriptionHierarchy(IEnumerable<IPivotFieldInfo> fieldInfos) { var root = base.GetFieldDescriptionHierarchy(fieldInfos); var childs = from node in root.Children let info = node.GetFieldInfoNode() let dispAtt = info.FieldInfo.GetDisplayAttribute() let groupName = dispAtt.GetGroupName() where !string.IsNullOrEmpty(groupName) group node by groupName into g select new { g.Key, g }; foreach (var group in childs.Reverse()) { var newFolder = new ContainerNode(group.Key, ContainerNodeRole.Folder); foreach (var item in group.g) { root.Children.Remove(item); newFolder.Children.Add(item); } } return root; } Note: GetFieldInfoNode & GetDisplayAttribute are extension methods.
The implemented is very easily: public class ExtendableLocalDataSourceFieldDescriptionsProvider : LocalDataSourceFieldDescriptionsProvider { protected override ContainerNode GetFieldDescriptionHierarchy(IEnumerable<IPivotFieldInfo> fieldInfos) { var infos = from info in fieldInfos orderby info.GetDisplayAttribute()?.GetOrder() select info; return base.GetFieldDescriptionHierarchy(fieldInfos); } We will be glad to get it out of the box for all data providers.
When I use QueryableDataProvider, the DisplayName of the aggregates is "Sum of MyField" etc., instead of the value of 'Pivot_AggregateSum' localization key.