Add functionality which will allow the end users to edit the aggregated data. The new values should be passed back to the business logic of the application which will decide how to divide the new value across underlying records.
To reproduce the problem, use the following setup for RadPivotGrid:
public RadForm1()
{
InitializeComponent();
DataTable table = new DataTable();
table.Columns.Add("Name", typeof(string));
table.Columns.Add("Salary", typeof(int));
table.Columns.Add("Title", typeof(string));
table.Rows.Add("John",1200,"Accountant");
table.Rows.Add("Ana", 800, "Accountant");
table.Rows.Add("Sam", 2500, "Manager");
table.Rows.Add("Tom", 1300, "Manager");
this.radPivotGrid1.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Title"});
this.radPivotGrid1.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Name" });
this.radPivotGrid1.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Salary", AggregateFunction = AggregateFunctions.Sum });
this.radPivotGrid1.DataSource = table;
}
Follow the steps:
1. Filter the child group ("Name") >> Salary>1000.
This is the result of the applied filter:
2. Filter the parent group ("Title") >> Salary>1500.
After applying the filter, the observed result is that the Accountant group is still displayed even though it should be filtered and hidden (like in Excel):
Observed result:
Expected result:
When the RowGrandTotalsPosition and ColumnGrandTotalsPosition for RadPivotGrid are set to First, it would be suitable to offers options for keeping the row/column grand totals always visible in the view after scrolling:
In this case, we have Field1 and Field2 and some of the data source items will have equal values for both properties. In this case, the equal value is an empty string.
When we filter the rows by removing the empty string value, it will also remove the column which has the same value(empty string).
The result is not correct.
One should be able to move the selected cell and scroll with the arrow keys. The attached project features a solution for moving the currently selected cell using the arrow keys.
The "Sort" item doesn't seem to be relevant for the report filter. It should be removed from the menu items. However, for the "Hide" item it can be added logic for removing the filter:
Hello,
I am using the pivot grid control would like to know if it is possible to add a start and end to the grouping?
My pivot grid looks like this: I would like the user to be able to specify a start and end for the grouping.
Excel has this option:
How can I replicate this functionality?
As a user I want to hide the Grand Totals for specific groups:
Workaround:
Use the new PivotGridSpreadExport
To reproduce:
- Set the ExportFlatData property to true
- Export the grid using PivotExportToExcelML
Workaround: If possible add the label filters with code PropertyGroupDescription dateGroupDescription = new PropertyGroupDescription(); dateGroupDescription.PropertyName = "Date"; LabelGroupFilter filter = new LabelGroupFilter(); ComparisonCondition condition = new ComparisonCondition { Condition = Telerik.Pivot.Core.Filtering.Comparison.IsGreaterThan, Than = new DateTime(2010, 6, 6) }; filter.Condition = condition; dateGroupDescription.GroupFilter = filter; this.provider.RowGroupDescriptions.Add(dateGroupDescription);
The best solution would be to have cells in Excel with the correct data type and formatted values. This can be achieved with an additional property similar to RadGridView. At the moment data cells which are created from aggregate descriptions with an applied StringFormat property are exported as text and they do not persist the formatting which is not correct. A possible workaround is to set the ExportVisualSettings property of the PivotGridSpreadExport object to true so that the formatting event to fire. Then in the CellFormatting event one can set the FormatString this way: private void SpreadExport_CellFormatting(object sender, PivotGridSpreadExportCellFormattingEventArgs e) { if (e.Cell.Text.StartsWith("$")) { e.Cell.FormatString = "$ #.00"; } else if (e.Cell.Text.Contains("€")) { e.Cell.FormatString = "#.00 €"; } } PivotGridSpreadExportCellFormattingEventArgs, however, does not provide information about the actual aggregate of the data cell, so the applied number format on the aggregate cannot be obtained in the formatting event.
When a filter dialog is shown (Report Filter or Label Filter) for OLAP Hierarchy, it contains the items only for the selected level. Instead items from all levels could be visible, so you won't have to open additional dialogs to filter them (show them like a tree).