Completed
Last Updated: 14 Jun 2016 05:51 by ADMIN
How to reproduce:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
    {
        PivotGridSpreadExport spreadExport = new PivotGridSpreadExport(this.radPivotGrid1);

        spreadExport.RunExport(@"..\..\exported-file.xlsx", new SpreadExportRenderer());
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        this.productsTableAdapter.Fill(this.nwindDataSet.Products);

        LocalDataSourceProvider dataProvider = new LocalDataSourceProvider();

        dataProvider.ItemsSource = nwindDataSet.Products;

        dataProvider.BeginInit();
        dataProvider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "CategoryID", GroupComparer = new GroupNameComparer() });
        dataProvider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "UnitPrice", AggregateFunction = AggregateFunctions.Sum });
        dataProvider.EndInit();

        this.radPivotGrid1.DataProvider = dataProvider;
    }
}


Workaround: create a custom pivot grid export object

 public partial class Form1 : Form
 {
     public Form1()
     {
         InitializeComponent();
     }

     private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
     {
         MyPivotGridSpreadExport spreadExport = new MyPivotGridSpreadExport(this.radPivotGrid1);

         spreadExport.RunExport(@"..\..\exported-file.xlsx", new SpreadExportRenderer());
     }

     private void Form1_Load(object sender, EventArgs e)
     {
         this.productsTableAdapter.Fill(this.nwindDataSet.Products);

         LocalDataSourceProvider dataProvider = new LocalDataSourceProvider();

         dataProvider.ItemsSource = nwindDataSet.Products;

         dataProvider.BeginInit();
         dataProvider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "CategoryID", GroupComparer = new GroupNameComparer() });
         dataProvider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "UnitPrice", AggregateFunction = AggregateFunctions.Sum });
         dataProvider.EndInit();

         this.radPivotGrid1.DataProvider = dataProvider;
     }
 }

public class MyPivotGridSpreadExport : PivotGridSpreadExport
{
    public MyPivotGridSpreadExport(RadPivotGrid pivotGrid)
        : base(pivotGrid) { }

    public override void Initialize()
    {
        base.Initialize();

        RadPivotGridElement pivotGrid = this.GetType().BaseType.GetField("pivotGrid", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as RadPivotGridElement;
        List<int> rowHeights = this.GetType().BaseType.GetField("rowHeights", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as List<int>;
        List<DescriptionBase> columnDescriptions = this.GetType().BaseType.GetField("columnDescriptions", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as List<DescriptionBase>;

        if (columnDescriptions.Count == 0)
        {
            rowHeights.Add(pivotGrid.RowHeight);
            columnDescriptions.Add(null);
        }
    }
}
Completed
Last Updated: 03 Jun 2016 06:01 by ADMIN
Workaround: use custom context menu

 public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            MyPivotGridContextMenu menu = new MyPivotGridContextMenu(this.radPivotGrid1.PivotGridElement);
            this.radPivotGrid1.PivotGridElement.ContextMenu = menu;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.productsTableAdapter.Fill(this.nwindDataSet.Products);

            LocalDataSourceProvider dataProvider = new LocalDataSourceProvider();

            dataProvider.ItemsSource = nwindDataSet.Products;

            dataProvider.BeginInit();
            dataProvider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "CategoryID", GroupComparer = new GroupNameComparer() });
            dataProvider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "ProductName", GroupComparer = new GroupNameComparer() });
            dataProvider.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "ProductID" });
            dataProvider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "UnitPrice", AggregateFunction = AggregateFunctions.Sum });
            dataProvider.EndInit();

            this.radPivotGrid1.DataProvider = dataProvider;
        }
    }

public class MyPivotGridContextMenu : PivotGridContextMenu
{
    public MyPivotGridContextMenu(RadPivotGridElement pivotGridElement)
        : base(pivotGridElement)
    { }


    protected override void OnCollapseAllMenuItemClick(object sender, EventArgs e)
    {
        PivotGroupElement groupElement = this.Context as PivotGroupElement;

        if (groupElement != null)
        {
             RadPivotGridElement pivotGridElement = this.GetType().BaseType
                .GetField("pivotGridElement", BindingFlags.Instance | BindingFlags.NonPublic)
                .GetValue(this) as RadPivotGridElement;

            pivotGridElement.SuspendLayout(true);

            if (groupElement.Data.Axis == PivotAxis.Rows)
            {
                foreach (PivotGroupNode node in pivotGridElement.GetRowGroups())
                {
                    node.Expanded = false;
                }
            }
            else
            {
                foreach (PivotGroupNode node in pivotGridElement.GetColumnGroups())
                {
                    node.Expanded = false;
                }
            }

            pivotGridElement.ResumeLayout(true, true);
            pivotGridElement.UpdateAfterExpandCollapse();
        }
    }
}
Completed
Last Updated: 26 May 2016 12:31 by ADMIN
Workaround:

private IList<PivotGroupNode> collapsedRowsNodes;
private void customMenuItem_Click(object sender, EventArgs e)
{
    PivotGridSpreadExport spreadExport = new PivotGridSpreadExport(pivotGrid);
    spreadExport.ExportCompleted += spreadExport_ExportCompleted;
    spreadExport.ExportFlatData = true;

    this.collapsedRowsNodes = new List<PivotGroupNode>();
    PivotGridGroupTraverser rowTraverser = (PivotGridGroupTraverser)this.pivotGrid.PivotGridElement.RowScroller.Traverser.GetEnumerator();
    while (rowTraverser.MoveNext())
    {
        PivotGroupNode current = rowTraverser.Current;
        if (!current.Expanded)
        {
            this.collapsedRowsNodes.Add(current);
            current.Expanded = true;
        }
    }

    spreadExport.RunExport(@"..\..\export.xlsx", new SpreadExportRenderer());
}

private void spreadExport_ExportCompleted(object sender, EventArgs e)
{
    foreach (PivotGroupNode node in this.collapsedRowsNodes)
    {
        node.Expanded = false;
    }
}
Completed
Last Updated: 18 May 2016 06:01 by ADMIN
Steps to reproduce:
Just add a value filter using the ValueFilterDialog. The filter is being applied properly, however, if you read the PropertyGroupDescription to which the filter has been added and check its AggregateIndex property, it is always 0.

Workaround: Use a custom ValueFilterDialog: http://docs.telerik.com/devtools/winforms/pivotgrid/dialogs/customizing-the-dialogs

this.radPivotGrid1.DialogsFactory = new MyDialogsFactory();
this.radPivotFieldList1.DialogsFactory = new MyDialogsFactory();

public class MyDialogsFactory : PivotGridDialogsFactory
{
    public override IValueFilterOptionsDialog CreateValueFilterOptionsDialog()
    {
        return new MyValueFilterOptionsDialog();
    }
}

public partial class MyValueFilterOptionsDialog : ValueFilterOptionsDialog
{
    public override Telerik.Pivot.Core.Filtering.IValueGroupFilter SelectedFilter
    {
        get
        {
            IValueGroupFilter filter =  base.SelectedFilter;
            filter.AggregateIndex = ((RadDropDownList)this.Controls["groupBox"].Controls["dropDownField"]).SelectedIndex;

            return filter;
        }

public override void LoadSettings(IValueGroupFilter filter, IValueGroupFilterHost filterHost, string fieldName, IEnumerable<string> aggregateNames)
{
    base.LoadSettings(filter, filterHost, fieldName, aggregateNames);
    if (filter != null)
    {
        ((RadDropDownList)this.Controls["groupBox"].Controls["dropDownField"]).SelectedIndex = filter.AggregateIndex;
    }
}

    }
}

Completed
Last Updated: 09 May 2016 13:59 by ADMIN
To reproduce:

this.ordersTableAdapter.Fill(this.nwindDataSet.Orders);
this.radPivotGrid1.RowGroupDescriptions.Add(new DateTimeGroupDescription() 
{ PropertyName = "OrderDate", Step = DateTimeStep.Year, GroupComparer = new GroupNameComparer() });
this.radPivotGrid1.RowGroupDescriptions.Add(new DateTimeGroupDescription() 
{ PropertyName = "OrderDate", Step = DateTimeStep.Quarter, GroupComparer = new GroupNameComparer() });
this.radPivotGrid1.RowGroupDescriptions.Add(new DateTimeGroupDescription() 
{ PropertyName = "OrderDate", Step = DateTimeStep.Month, GroupComparer = new GroupNameComparer() });
this.radPivotGrid1.ColumnGroupDescriptions.Add(new PropertyGroupDescription() 
{ PropertyName = "EmployeeID", GroupComparer = new GrandTotalComparer() });
this.radPivotGrid1.FilterDescriptions.Add(new PropertyFilterDescription() 
{ PropertyName = "ShipCountry", CustomName = "Country" });
this.radPivotGrid1.DataSource = this.ordersBindingSource;


Workaround:

public Form1()
{
    InitializeComponent();

    this.radPivotGrid1.DialogsFactory = new MyDialogsFactory();
    this.radPivotFieldList1.DialogsFactory = new MyDialogsFactory();
}

public class MyDialogsFactory : PivotGridDialogsFactory
{
    public override ITop10FilterOptionsDialog CreateTop10FilterOptionsDialog()
    {
        return new MyITop10FilterOptionsDialog();
    } 
}

public class MyITop10FilterOptionsDialog : Top10FilterOptionsDialog 
{
    public override ITopGroupsFilter SelectedFilter
    {
        get
        {
            if (((RadDropDownList)this.Controls["groupBox"].Controls["dropDownFields"]).SelectedValue == null)
            {
                return null;
            }
            return base.SelectedFilter;
        }
    }
}
Completed
Last Updated: 07 Mar 2016 12:33 by ADMIN
Workaround: 

Use the new PivotGridSpreadExport class: http://www.telerik.com/help/winforms/pivotgrid-export-srpead-export.html
Completed
Last Updated: 07 Mar 2016 11:54 by ADMIN
To reproduce: 
1. Add RadPivotGrid on the form and populate it with data 
2. Add 2 buttons to export to xls and xlsx formats 
3. Run the form and export to xls format 
4. Minimize the form. You will see that one of row is disappeared
5. Repeat the same action and you will see that a second row is disappeared. 

The issue if observed with both exporter providers (PivotGridSpreadExport/PivotExportToExcelML) and export with visual settings. 

Workaround: 
In the handler of the SizeChanged event clear the cached elements: 
void Form1_SizeChanged(object sender, EventArgs e)
{
    this.radPivotGrid1.PivotGridElement.PivotRowsContainer.ElementProvider.ClearCache(); 
}
Completed
Last Updated: 12 Jan 2016 09:50 by Todor
To reproduce:
Set the decimal separator to comma(,) in your regional settings and export the RadPivotGrid using PivotExportToExcellML. Open the exported file and you will see that the font size is very big.
Workaround:
Subscribe to the PivotExcelCellFormatting event and set the font size to an integer value:
void excelExporter_PivotExcelCellFormatting(object sender, ExcelPivotCellExportingEventArgs e)
{
    e.Cell.Font = new Font(e.Cell.Font.Name, (int)e.Cell.Font.Size, e.Cell.Font.Style);
}
Completed
Last Updated: 11 Dec 2015 14:55 by ADMIN
Add the ability to export to OpenXML format, specifically ".xlsx".
Completed
Last Updated: 01 Dec 2015 13:52 by Todor
To reproduce:
Resize some of the columns in PivotGrid and then export it with PivotExporttoExcelML. All columns in exported file have the same width.
Workaround:
Use PivotGridSpreadExport.
Completed
Last Updated: 12 Oct 2015 10:10 by Todor
To reproduce:
In RadPivotGrid set some cell values to start with "=" or "-". Export it using PivotGridSpreadExport. The exporter tries to convert the value to formula and if this is not successful an exception is thrown.

Workaround:
private void radButtonNewPivotToExcel_Click(object sender, EventArgs e)
{
    SaveFileDialog saveFileDialog = new SaveFileDialog();
    saveFileDialog.Filter = "Excel files (*.xlsx)|*.xlsx";
    if (saveFileDialog.ShowDialog() == DialogResult.OK)
    {
        SpreadExportRenderer renderer = new SpreadExportRenderer();
        MyPivotSpreadExport exporter = new MyPivotSpreadExport(this.radPivotGrid1, renderer);
        exporter.ExportFormat = SpreadExportFormat.Xlsx;
        exporter.RunExportAsync(saveFileDialog.FileName + ".xlsx", renderer);
    }
}

public class MyPivotSpreadExport : PivotGridSpreadExport
{
    private ISpreadExportRenderer spreadExportRenderer;

    public MyPivotSpreadExport(RadPivotGrid pivotGrid, ISpreadExportRenderer renderer)
        : base(pivotGrid)
    {
        this.spreadExportRenderer = renderer;
    }

    protected override void AddRowToWorksheet(PivotGridExportRowElement rowElement)
    {
        foreach (PivotGridSpreadExportCellElement exportCell in rowElement.Cells)
        {
            this.spreadExportRenderer.CreateCellSelection(rowElement.Index, exportCell.ColumnIndex);

            Color borderColor = this.ShowGridLines ? exportCell.BorderColor : Color.Transparent;
            this.spreadExportRenderer.CreateCellStyleInfo(exportCell.BackColor, exportCell.ForeColor, exportCell.Font.FontFamily, exportCell.Font.Size,
                exportCell.Font.Bold, exportCell.Font.Italic, exportCell.Font.Underline, exportCell.TextAlignment, exportCell.TextWrap, BorderBoxStyle.SingleBorder,
                borderColor, Color.Empty, Color.Empty, Color.Empty, Color.Empty);

            if (exportCell.DataType == DataType.String || exportCell.DataType == DataType.Other)
            {
                this.spreadExportRenderer.SetCellSelectionFormat("@");
            }
            this.spreadExportRenderer.SetCellSelectionValue(exportCell.DataType, exportCell.Value ?? exportCell.Text);
        }
    }
}

Completed
Last Updated: 14 Sep 2015 13:53 by ADMIN
Argument exception when a specific layout is loaded:
"An item with the same key has already been added."
Completed
Last Updated: 10 Sep 2015 07:50 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: PivotGrid
Type: Bug Report
0
Wokaround:

Private Sub GroupDescriptorElementCreating(sender As Object, e As Telerik.WinControls.UI.GroupDescriptorElementCreatingEventArgs)
    RemoveHandler e.GroupDescriptorElement.FilterPopup.TextBoxMenuItem.TextBox.TextChanged, AddressOf TextBoxMenuItemTextChanged
    AddHandler e.GroupDescriptorElement.FilterPopup.TextBoxMenuItem.TextBox.TextChanged, AddressOf TextBoxMenuItemTextChanged 
End Sub

Private Sub TextBoxMenuItemTextChanged(sender As Object, e As EventArgs)
    Dim tb As RadTextBox = TryCast(sender, RadTextBox)
    Dim popup As PivotGroupFilterPopup = TryCast(tb.Parent, PivotGroupFilterPopup)
    popup.TreeViewMenuItem.TreeElement.TreeView.EndUpdate()
End Sub
Completed
Last Updated: 10 Sep 2015 07:45 by ADMIN
Workaround:
public Form1()
{
    InitializeComponent();
    this.radPivotGrid1.GroupDescriptorElementCreating += radPivotGrid1_GroupDescriptorElementCreating;
}

private void radPivotGrid1_GroupDescriptorElementCreating(object sender, Telerik.WinControls.UI.GroupDescriptorElementCreatingEventArgs e)
{
    e.GroupDescriptorElement.FilterPopup.PopupOpened -= FilterPopup_PopupOpened;
    e.GroupDescriptorElement.FilterPopup.PopupOpened += FilterPopup_PopupOpened;
}

private void FilterPopup_PopupOpened(object sender, EventArgs args)
{
    PivotGroupFilterPopup filterPopup = (PivotGroupFilterPopup)sender;
    RadTreeView tree = filterPopup.TreeViewMenuItem.TreeElement.TreeView;

    ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Value = 10;
    ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Value = 0;
}

Completed
Last Updated: 10 Sep 2015 06:40 by ADMIN
Workaround: 

private void radPivotGrid1_GroupDescriptorElementCreating(object sender, Telerik.WinControls.UI.GroupDescriptorElementCreatingEventArgs e)
{
    e.GroupDescriptorElement.FilterPopup.PopupOpened -= FilterPopup_PopupOpened;
    e.GroupDescriptorElement.FilterPopup.PopupOpened += FilterPopup_PopupOpened;
}

private void FilterPopup_PopupOpened(object sender, EventArgs args)
{
    PivotGroupFilterPopup filterPopup = (PivotGroupFilterPopup)sender;
    RadTreeView tree = filterPopup.TreeViewMenuItem.TreeElement.TreeView;
    int height = this.CalculateHeight(tree);
    if (height > tree.Height)
    {
        ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Value = 0;
        ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Maximum = height;
        ((RadScrollBarElement)tree.TreeViewElement.Children[2]).Visibility = Telerik.WinControls.ElementVisibility.Visible;
    }
}

private int CalculateHeight(RadTreeView tree)
{
    int height = 0;
    for (int i = 0; i < tree.Nodes[0].Nodes.Count + 1; i++)
    {
        height += tree.ItemHeight;
    }

    return height;
}

Completed
Last Updated: 17 Aug 2015 09:56 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: PivotGrid
Type: Bug Report
1
To reproduce:

1. Add a RadPivotGrid and  change its theme to TelerikMetro. This theme uses Segoe UI font for its cells.
2. Export the RadPivotGrid.
3. You will notice that the font is applied to some of the cells, but for others, e.g. Grand Total the default font is set to Microsoft Sans Serif

Second scenario: use Demo application PivotGrid >> Export to Excel example. Use ControlDefault theme.
1. Ctrl + H to show the spy.  Check font for row  "Jun-1 >> Sum of Net", column "Printer stand >> 1 Free with 10".  The font is Segoe UI.
2. Run the export and check the same cell in Excel. Its font is Microsoft Sans Serif.

Workaround: use the PivotExcelCellFormatting event to specify the font.
Completed
Last Updated: 05 Aug 2015 13:40 by ADMIN
Completed
Last Updated: 23 Jul 2015 13:06 by ADMIN
To reproduce:
- Add calculated field
- Try to set its number format, by clicking the Number Format option in the context menu in the field list (see image)

Workaround:
 Private Sub RadPivotGrid1_CellFormatting(sender As Object, e As UI.PivotCellEventArgs) Handles RadPivotGrid1.CellFormatting
        If e.CellElement.Column.Name = "Commission" Then
            e.CellElement.Text = String.Format(System.Threading.Thread.CurrentThread.CurrentUICulture, "{0:C}", e.CellElement.Value)
        End If
    End Sub
Completed
Last Updated: 21 Jul 2015 10:12 by ADMIN
ADMIN
Created by: Dimitar
Comments: 1
Category: PivotGrid
Type: Feature Request
3
Add the ability to export in pdf format.