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.
Add the ability to export in pdf format.
The group description now has AutoShowSubTotals property determining whether subtotals will be generated for the description:
this.radPivotGrid1.RowGroupDescriptions.Add(new DateTimeGroupDescription
{
PropertyName = "OrderDate",
Step = DateTimeStep.Quarter,
GroupComparer = new GroupNameComparer(),
AutoShowSubTotals = false
});
If you have an object with string property and for all the available objects in the RadPivotgrid you have numeric values for this property with leading zero digits (e.g. "002"), it is exported in Excel as a numeric cell.
Currently the AdomdDataProvider supports only AdomdClient version 10.0 which supports Microsoft SQL Server 2008. Add support for newer versions.
Change the Decimal symbol/separator to "," and run Excel export for the RadPivotGrid. Note that all "0,00" cells are displayed as "1" in Excel and all decimal values are displayed without decimal separator. Another scenario is when you change the Format in the Regional settings to Russia. Then, when exporting data, the decimal separator for the GrandTotal column is not correct ".", instead of ",". However, for the data cells it is OK.
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.
Description: One should be able to resize row header cells programmatically as it is with the mouse currently.
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: - 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
AutoSizeRows property which allows autosizing both header rows and data rows.
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 the ability to export to OpenXML format, specifically ".xlsx".
Include a way for the developers to set the height of the header in code
RadPivotGrid Implement logic when the user clicks on a cell to get the underlying data
PivotGrid get all the rows that 'lie' beneath a visible cell value
Currently the only way to recognize something changed as accurate as possible is to use StatusChanged on the DataProvider, but that does not tell apart from a structure change or just a click on the Update button… it would be nice to have such events available (onUpdate, onFieldListModified etc)