Completed
Last Updated: 12 Mar 2018 12:17 by Dimitar
How to reproduce: check the attached project and screenshots, the correct items are shown in screenshot correct-items-calculated-field.jpg

Workaround: 
public partial class Form1 : Form
{
    private LocalDataSourceProvider provider;

    public Form1()
    {
        InitializeComponent();

        //Setup pivot and add calculated field

        //Workaround
        this.radPivotFieldList1.ValuesControl.CreatingVisualListItem += ValuesControl_CreatingVisualListItem;
    }

    private void ValuesControl_CreatingVisualListItem(object sender, CreatingVisualListItemEventArgs args)
    {
        args.VisualItem = new MyPivotFieldListVisualItem(this.radPivotFieldList1.ViewModel);
    }
}

public class MyPivotFieldListVisualItem : PivotFieldListVisualItem
{
    FieldListViewModel viewModel;

    public MyPivotFieldListVisualItem(FieldListViewModel viewModel)
        : base(viewModel)
    {
        this.viewModel = viewModel;
    }

    protected override void UpdateContextMenu()
    {
        base.UpdateContextMenu();

        PivotFieldListItemButton button = (PivotFieldListItemButton)typeof(PivotFieldListVisualItem).GetField("button", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(this);
        string providerName = this.viewModel.DataProvider != null ? this.viewModel.DataProvider.GetType().FullName : String.Empty;
        if (this.Data == null)
        {
            return;
        }

        if (this.Data.DataBoundItem is Value && !(providerName.Contains("Xmla") || providerName.Contains("Adomd")))
        {
            for (int i = 0; i < 5; i++)
            {
                button.Items.RemoveAt(i);
            }
        }
    }
}


Unplanned
Last Updated: 12 Feb 2018 12:37 by ADMIN
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.
Completed
Last Updated: 29 Nov 2017 14:07 by ADMIN
Completed
Last Updated: 11 Jul 2017 14:00 by ADMIN
To reproduce:
Try setting the value in the CellForamting event. 

Workaround:
class MySpreadExportRenderer : SpreadExportRenderer
{
    public override void SetCellSelectionValue(DataType dataType, object value)
    {
        base.SetCellSelectionValue(dataType, value);
        if (dataType == DataType.Number)
        {
            CellRange range = ((CellSelection)this.GetCellSelection()).CellRanges.ElementAtOrDefault(0);
            double d;
            if (double.TryParse(Convert.ToString(value), out d))
            {
                var cell = ((Worksheet)this.GetWorksheet()).Cells[range.FromIndex.RowIndex, range.FromIndex.ColumnIndex];
                cell.SetFormat(new CellValueFormat("#,##0.00"));
                cell.SetValue(d);
            }
        }
    }
}

Completed
Last Updated: 28 Jun 2017 06:32 by ADMIN
Workaround:
public Form1()
{
    InitializeComponent();

    this.radPivotGrid1.GroupDescriptorElementCreating += radPivotGrid1_GroupDescriptorElementCreating;
}

private void radPivotGrid1_GroupDescriptorElementCreating(object sender, Telerik.WinControls.UI.GroupDescriptorElementCreatingEventArgs e)
{
    FieldInfo fi = e.GroupDescriptorElement.GetType().GetField("filterPopup", BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
    fi.SetValue(e.GroupDescriptorElement, new MyPivotGroupFilterPopup(e.GroupDescriptorElement) { Visible = false });

    e.GroupDescriptorElement.SortDirectionArrow.Visibility = ElementVisibility.Collapsed;
}

public class MyPivotGroupFilterPopup : PivotGroupFilterPopup
    {
        public MyPivotGroupFilterPopup(PivotGroupDescriptorElement pivotGroupDescriptorElement)
            : base(pivotGroupDescriptorElement)
        { }

        protected override void LoadSettings()
        {
            base.LoadSettings();

            this.Items.Remove(SortAZMenuItem);
            this.Items.Remove(SortZAMenuItem);
            this.Items.Remove(SortOptionsMenuItem);
        }
    }
Completed
Last Updated: 16 May 2017 06:12 by ADMIN
Workaround: remove the localization provider before saving the layout and then add it back.
Completed
Last Updated: 31 Oct 2016 13:32 by ADMIN
How to reproduce: check the attached video

Workaround: 
private void button1_Click(object sender, EventArgs e)
{
    this.radPivotFieldList1.DragDropService.PreviewDragDrop += DragDropService_PreviewDragDrop;
}

IGroupDescription cache;
string group;
private void DragDropService_PreviewDragDrop(object sender, Telerik.WinControls.RadDropEventArgs e)
{
    TreeNodeElement nodeElement = e.DragInstance as TreeNodeElement;
    if (nodeElement != null)
    {
        IField field = nodeElement.Data.DataBoundItem as IField;
        string draggedItem = field.FieldInfo.Name;
        IGroupDescription rowDesc = this.radPivotGrid1.RowGroupDescriptions.Where(i => i.GetUniqueName() == draggedItem).FirstOrDefault();
        if (rowDesc != null)
        {
            cache = (IGroupDescription)rowDesc.Clone();
            group = "Row";
        }

        IGroupDescription colDesc = this.radPivotGrid1.ColumnGroupDescriptions.Where(i => i.GetUniqueName() == draggedItem).FirstOrDefault();
        if (colDesc != null)
        {
            cache = (IGroupDescription)colDesc.Clone();
            group = "Column";
        }

        if (cache != null)
        {
            this.radPivotGrid1.UpdateCompleted += radPivotGrid1_UpdateCompleted;    
        }
    }
}

private void radPivotGrid1_UpdateCompleted(object sender, EventArgs e)
{
    this.radPivotGrid1.UpdateCompleted -= radPivotGrid1_UpdateCompleted;
    switch (group)
    {
        case "Row":
            this.radPivotGrid1.RowGroupDescriptions.Add(cache);
            break;
        case "Column":
            this.radPivotGrid1.ColumnGroupDescriptions.Add(cache);
            break;
        default:
            break;
    }

    cache = null;
}
Completed
Last Updated: 31 Oct 2016 13:31 by ADMIN
How to reproduce:
   var data = this.dbContext.Orders.Where(o => o.OrderID > 10500).Select(o => new
            {
                Id = o.OrderID,
                OrderDate = o.OrderDate,
                ShipDate = o.ShippedDate,
                Freight = o.Freight
            }).ToArray();

this.localDataProvider = new LocalDataSourceProvider() {ItemsSource = data};

Workaround:
1. Instead of  ToArray call ToList
var data = this.dbContext.Orders.Where(o => o.OrderID > 10500).Select(o => new
{
    Id = o.OrderID,
    OrderDate = o.OrderDate,
    ShipDate = o.ShippedDate,
    Freight = o.Freight
}).ToList();

this.localDataProvider = new LocalDataSourceProvider() {ItemsSource = data};

2. Call the ToArray method but do not create anonymous objects.
var data = this.dbContext.Orders.Where(o => o.OrderID > 10500).Select(o => new PivotModel
{
    Id = o.OrderID,
    OrderDate = o.OrderDate,
    ShipDate = o.ShippedDate,
    Freight = o.Freight
}).ToArray();

this.localDataProvider = new LocalDataSourceProvider() {ItemsSource = data};

public class PivotModel
{
    public int Id { get; set; }

    public DateTime? OrderDate { get; set; }

    public DateTime? ShipDate { get; set; }

    public decimal? Freight { get; set; }
}

Completed
Last Updated: 07 Oct 2016 07:18 by ADMIN
Workaround:
private void PrintPivotGrid()
{
    MyPivotGridPrintStyle style = new MyPivotGridPrintStyle();
    style.LayoutType = PivotLayout.Tabular;
    this.radPivotGrid1.PrintStyle = style;
    this.radPivotGrid1.PrintPreview();
}

public class MyPivotGridPrintStyle : PivotGridPrintStyle
{
    public override void Initialize()
    {
        base.Initialize();

        FieldInfo fiColumnWidths = this.GetType().BaseType.GetField("columnWidths", BindingFlags.Instance | BindingFlags.NonPublic);
        List<int> columnWidths = (List<int>)fiColumnWidths.GetValue(this);
        RadPivotGridElement pivotGrid = (RadPivotGridElement)this.GetType().BaseType.GetField("pivotGrid", BindingFlags.Instance | BindingFlags.NonPublic)
                                                                                    .GetValue(this);

        for (int i = 0; i < pivotGrid.RowDescriptorsArea.Children.Count; i++)
        {
            RadElement descriptor = pivotGrid.RowDescriptorsArea.Children[i];
            columnWidths[i] = descriptor.Size.Width;
        }
    }
}


Completed
Last Updated: 31 Aug 2016 09:42 by ADMIN
Until the feature gets implemented use custom PivotGridPrintStyle:

Public Class MyPivotGridPrintStyle
    Inherits PivotGridPrintStyle

    Const MIN_SPACE As Integer = 1

    Public Overrides Sub DrawPage(drawArea As Rectangle, graphics As Graphics, pageNumber As Integer)

        If Me.PivotGrid.ColumnHeaderHeight > MIN_SPACE Then
            MyBase.DrawPage(drawArea, graphics, pageNumber)

        Else
            Dim x As Integer = drawArea.X
            Dim y As Integer = drawArea.Y
            Dim scale As SizeF = DirectCast(Me.GetType().BaseType.GetMethod("GetScaleFactors", BindingFlags.Instance Or BindingFlags.NonPublic).Invoke(Me, New Object() {drawArea}), SizeF)

            Dim startColumn As Integer = DirectCast(Me.GetType().BaseType.GetMethod("GetStartColumn", BindingFlags.Instance Or BindingFlags.NonPublic).Invoke(Me, New Object() {pageNumber, drawArea, scale.Width}), Integer)
            Dim endColumn As Integer = DirectCast(Me.GetType().BaseType.GetMethod("GetEndColumn", BindingFlags.Instance Or BindingFlags.NonPublic).Invoke(Me, New Object() {startColumn, drawArea, scale.Width}), Integer)
            Dim startRow As Integer = DirectCast(Me.GetType().BaseType.GetMethod("GetStartRow", BindingFlags.Instance Or BindingFlags.NonPublic).Invoke(Me, New Object() {pageNumber, drawArea, scale.Height}), Integer)
            Dim endRow As Integer = DirectCast(Me.GetType().BaseType.GetMethod("GetEndRow", BindingFlags.Instance Or BindingFlags.NonPublic).Invoke(Me, New Object() {startRow, drawArea, scale.Height}), Integer)

            If Me.PivotGrid.ColumnHeaderHeight <= MIN_SPACE Then
                startRow += 1
            End If

            For i As Integer = startRow To endRow
                x = drawArea.X
                Dim maxHeight As Integer = 0

                For j As Integer = startColumn To endColumn
                    Dim columnWidths = DirectCast(Me.GetType().BaseType.GetField("columnWidths", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me), List(Of Integer))
                    Dim rowHeights = DirectCast(Me.GetType().BaseType.GetField("rowHeights", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me), List(Of Integer))

                    Dim elementRect As New Rectangle(x, y, columnWidths(j), rowHeights(i))
                    Dim printElement As RadPrintElement = Me.GetPrintElementForCell(i, j)
                    printElement.ScaleTransform = scale
                    Dim transformedRect As RectangleF = printElement.GetTransformedBounds(elementRect)

                    Me.PrintElement(printElement, drawArea, elementRect, graphics)
                    x += CInt(Math.Floor(transformedRect.Width))
                    maxHeight = Math.Max(maxHeight, CInt(Math.Floor(transformedRect.Height)))
                Next

                y += maxHeight
            Next
        End If
    End Sub

End Class
Completed
Last Updated: 09 Aug 2016 08:02 by ADMIN
How to reproduce check the attached project and video

Workaround: handle the UpdateCompleted event and explicitly set the properties to true

public LocalDataSourceSerializerForm()
{
    InitializeComponent();

    this.radPivotGrid1.AutoExpandColumnHeaders = false;
    this.radPivotGrid1.AutoExpandRowHeaders = false;

    this.radPivotGrid1.UpdateCompleted += radPivotGrid1_UpdateCompleted;
}

private void radPivotGrid1_UpdateCompleted(object sender, EventArgs e)
{
    this.radPivotGrid1.AutoExpandColumnHeaders = true;
    this.radPivotGrid1.AutoExpandRowHeaders = true;
}



Completed
Last Updated: 20 Jul 2016 09:13 by ADMIN
Workaround: 
public class MyRadPivotGrid : RadPivotGrid
{
    public override void SaveLayout(string fileName)
    {
        ComponentXmlSerializer ser = new ComponentXmlSerializer(this.XmlSerializationInfo);

        using (XmlTextWriter writer = new XmlTextWriter(fileName, Encoding.UTF8))
        {
            writer.Formatting = Formatting.Indented;
            writer.WriteStartElement("RadPivotGrid");
            ser.WriteObjectElement(writer, this);
        }
    }
}
Completed
Last Updated: 21 Jun 2016 07:49 by ADMIN
Workaround: create a custom Top10FilterOptionsDialog

public Form1()
{
    InitializeComponent();

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

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

public class MyTop10FilterOptionsDialog : Top10FilterOptionsDialog
{
    public override void LoadSettings(Telerik.Pivot.Core.Filtering.ITopGroupsFilter filter, string fieldName, IEnumerable<string> aggregateNames)
    {
        base.LoadSettings(filter, fieldName, aggregateNames);

        if (filter != null)
        {
            ((RadDropDownList)this.Controls["groupBox"].Controls["dropDownTopBottom"]).SelectedValue = filter.Selection;
        }
    }
}
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;
        }
    }
}