To reproduce: Bind a RadPivotGrid and set the theme to Breeze. You will see that there are no filtering buttons. Workaround: Use the following code to set an image to the buttons: protected override void OnLoad(EventArgs e) { base.OnLoad(e); List<PivotFilterFunctionButton> elements = this.FindAllElements<PivotFilterFunctionButton>(this.pivot.PivotGridElement); Image img = Image.FromFile(@"filter.png"); foreach (PivotFilterFunctionButton item in elements) { item.Image = img; } } public List<T> FindAllElements<T>(RadElement parent) where T : RadElement { List<T> list = new List<T>(); this.FindAllElementsCore(parent, list); return list; } private void FindAllElementsCore<T>(RadElement parent, List<T> list) where T : RadElement { if (parent is T) { list.Add(parent as T); return; } foreach (RadElement item in parent.Children) { FindAllElementsCore<T>(item, list); } } The image can be downloaded below.
It should be possible to persist the current configuration of RadPivotGrid so that when the settings are loaded, the settings of the RadPivotGrid should appear as when they were saved. This includes the column/row/filter/aggregate descriptors, the width/height of the resized rows/columns and the applied filters.
To reproduce: - Change some cell properties and export the grid. - You will notice that the the changed properties are not exported.
This is mainly focus on DateTime fields. They automatically create children name Day, Week and etc.They should be named “<parentName>.Day” Only for local field description Add in LocalDataSourceFieldDescriptionsProvider property named FormatDisplayNameAsName which turn on/off this functionality ((LocalDataSourceFieldDescriptionsProvider)((LocalDataSourceProvider)this.radPivotGrid1.DataProvider).FieldDescriptionsProvider).FormatDisplayNameAsFieldName= true
Add support for custom calculated items. For example: Users should be able to calculate the subtotal for the given column based on other columns subtotals.
Drag the field contains date from field choicer control to Column data area. Then remove one of the sum field. The exception will thrown. Workaround: Use the DLLs for NET2.0
User is not able to open the Filter Popup Dialog when filter items contains DBNULL Workaround: Replace the DBNULL values with empty strings in your datatable.
For example: If you grouping using of DateTimeGroupDescription you should be able to format date as dd.MM.yyyy instead of Apr-22 Resolution: You can use the GroupElementFormatting event to format the text in the GroupDescription elements. Please, note that the developer should add an own logic for formatting a date (for example you should take the year and month from another fields)
RadPivot prints only left columns and the columns placed on the right part of the control do not print
To reproduce: - Set the text of a GroupElement in the GroupElementFormatting event handler. - Start the grid and resize a column for example. - You will notice the the text is reverted to its original value. Workaround: - Use the following CustomGroupElement class: public class CustomGroupElement : PivotGroupElement { protected override void SynchronizeProperties() { base.SynchronizeProperties(); this.Text = "test"; } protected override Type ThemeEffectiveType { get { return typeof(PivotGroupElement); } } } - you can replace the default element with the custom one in GroupElementCreating event handler: Private Sub radPivotGrid1_GroupElementCreating(sender As Object, e As PivotGroupElementCreatingEventArgs) e.GroupElement = New CustomGroupElement() End Sub
To reproduce: - Add a pivot grid and a field list to a blank form. - Populate the pivot grid with LocalDataSourceProvider - Show and close the form several times and collect the garbage. - The memory is freed properly. - Bind the controls and show and close the form several times again. - After the garbage collection the memory is not freed.
When a class implements ICustomTypeDescriptor or has a custom TypeDescriptor, the "Field chooser" in the RadPivotGrid displays the correct property display name, but the RadPivotFieldList does not.
To reproduce: 1. Open QSF => Pivot => Printing example2. Click Print settings button3. Choose layout type - Compact4. Click Preview button and will see that there is exception WORKAROUND: radPivotGrid1.PrintStyle = new MyPrintStyle();
To reproduce: Add a RadPivotGrid and a few columns, select one column and show the PrintingDialog. Select "Print Selection Only", exception will occur. Workaround: Use the following print style - public class MyPrintStyle : PivotGridPrintStyle { private Func<Rectangle, SizeF> getScaleFactors; private Func<int, Rectangle, float, int> getStartColumn; private Func<int, Rectangle, float, int> getEndColumn; private Func<int, Rectangle, float, int> getStartRow; private Func<int, Rectangle, float, int> getEndRow; private List<AggregateDescriptionBase> aggregates; private List<int> columnWidths; private List<int> rowHeights; private Type baseType; private BindingFlags flags; public override void Initialize() { base.Initialize(); this.baseType = typeof(PivotGridPrintStyle); this.flags = BindingFlags.NonPublic | BindingFlags.Instance; this.getScaleFactors = this.GetFuncFromParent<Rectangle, SizeF>("GetScaleFactors"); this.getStartColumn = this.GetFuncFromParent<int, Rectangle, float, int>("GetStartColumn"); this.getEndColumn = this.GetFuncFromParent<int, Rectangle, float, int>("GetEndColumn"); this.getStartRow = this.GetFuncFromParent<int, Rectangle, float, int>("GetStartRow"); this.getEndRow = this.GetFuncFromParent<int, Rectangle, float, int>("GetEndRow"); this.aggregates = GetField<List<AggregateDescriptionBase>>("aggregates"); this.columnWidths = GetField<List<int>>("columnWidths"); this.rowHeights = GetField<List<int>>("rowHeights"); } private T GetField<T>(string name) { return (T)this.baseType.GetField(name, flags).GetValue(this); } private Func<T, TResult> GetFuncFromParent<T, TResult>(string method) { MethodInfo getScaleFactor = baseType.GetMethod(method, flags); var func = (Func<T, TResult>)Delegate.CreateDelegate(typeof(Func<T, TResult>), this, getScaleFactor); return func; } private Func<T1, T2, T3, TResult> GetFuncFromParent<T1, T2, T3, TResult>(string method) { MethodInfo getScaleFactor = baseType.GetMethod(method, flags); var func = (Func<T1, T2, T3, TResult>)Delegate.CreateDelegate(typeof(Func<T1, T2, T3, TResult>), this, getScaleFactor); return func; } public override void DrawPage(Rectangle drawArea, Graphics graphics, int pageNumber) { int x = drawArea.X; int y = drawArea.Y; SizeF scale = this.getScaleFactors(drawArea); int startColumn = this.getStartColumn(pageNumber, drawArea, scale.Width); int endColumn = this.getEndColumn(startColumn, drawArea, scale.Width); int startRow = this.getStartRow(pageNumber, drawArea, scale.Height); int endRow = this.getEndRow(startRow, drawArea, scale.Height); int aggregateIndex = 0; for (int i = startRow; i <= endRow; i++) { x = drawArea.X; int maxHeight = 0; for (int j = startColumn; j <= endColumn; j++) { if (j == 0 && i == 0 && aggregateIndex < this.aggregates.Count) { while (aggregateIndex < this.aggregates.Count) { if (j >= this.columnWidths.Count || i >= this.rowHeights.Count) { break; } Rectangle aggregateElementRect = new Rectangle(x, y, this.columnWidths[j], this.rowHeights[i]); RadPrintElement aggregatePrintElement = this.GetAggregateDescriptorCell(aggregateIndex++); aggregatePrintElement.ScaleTransform = scale; RectangleF aggregateTransformedRect = aggregatePrintElement.GetTransformedBounds(aggregateElementRect); this.PrintElement(aggregatePrintElement, drawArea, aggregateElementRect, graphics); x += (int)Math.Floor(aggregateTransformedRect.Width); maxHeight = Math.Max(maxHeight, (int)Math.Floor(aggregateTransformedRect.Height)); if (aggregateIndex < this.aggregates.Count) { j++; } } continue; } Rectangle elementRect = new Rectangle(x, y, this.columnWidths[j], this.rowHeights[i]); RadPrintElement printElement = this.GetPrintElementForCell(i, j); printElement.ScaleTransform = scale; RectangleF transformedRect = printElement.GetTransformedBounds(elementRect); this.PrintElement(printElement, drawArea, elementRect, graphics); x += (int)Math.Floor(transformedRect.Width); maxHeight = Math.Max(maxHeight, (int)Math.Floor(transformedRect.Height)); } y += maxHeight; } } }
ADD. RadPivotGrid - add export to excel functionality
Steps to reproduce: 1. Add a RadPivotGrid to a form and populate it with data or use the one in the Demo application 2. Press Ctrl+A to select all cells 3, Press Ctrl+C to copy all cells to the clipboard You will get an exception.
IMPROVE. RadPivotGrid - expose a method for accessing cell values
Implement "Calculated Fields" support in RadPivotGrid
ADD. RadPivotGrid - add localization provider
To workaround, also add a handler to the AggregatesPositionElementCreating event.