Unplanned
Last Updated: 02 Oct 2020 07:54 by ADMIN
Created by: Chris
Comments: 1
Category: PivotGrid
Type: Feature Request
3

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?

Unplanned
Last Updated: 30 Jul 2020 08:42 by ADMIN
Created by: paulo g
Comments: 0
Category: PivotGrid
Type: Feature Request
2

As a user I want to hide the Grand Totals for specific groups:

Completed
Last Updated: 28 Jul 2020 09:02 by ADMIN
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
});
Completed
Last Updated: 02 Jan 2020 09:34 by ADMIN
Release R1 2020
Completed
Last Updated: 04 Sep 2019 13:29 by ADMIN
Release R3 2019
Hour, minute, second, if possible also week
Completed
Last Updated: 04 Sep 2019 13:28 by ADMIN
Release R3 2019
ADMIN
Created by: Dimitar
Comments: 3
Category: PivotGrid
Type: Feature Request
1

			
Unplanned
Last Updated: 05 Jun 2019 08:02 by ADMIN
Unplanned
Last Updated: 04 Jun 2019 11:03 by ADMIN

To reproduce: 

- Set the ExportFlatData property to true

- Export the grid using PivotExportToExcelML

Completed
Last Updated: 29 Mar 2019 09:40 by Dimitar
How to reproduce: see the attached video

Workaround:
public partial class Form2 : Form
{
    public Form2()
    {
        InitializeComponent();

        this.radPivotFieldList1.DragDropService = new CustomPivotFieldListDragDropService(this.radPivotFieldList1);
    }

    private void Form2_Load(object sender, EventArgs e)
    {
        // TODO: This line of code loads data into the 'nwindDataSet.Orders' table. You can move, or remove it, as needed.
        this.ordersTableAdapter.Fill(this.nwindDataSet.Orders);

    }
}

public class CustomPivotFieldListDragDropService : PivotFieldListDragDropService
{
    private RadPivotFieldList fieldList;
    private Telerik.WinControls.UI.PivotFieldList.FieldPayload payload;

    public CustomPivotFieldListDragDropService(RadPivotFieldList fieldList)
        : base(fieldList)
    {
        this.fieldList = fieldList;
    }

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

        Telerik.WinControls.UI.PivotFieldList.IField draggedField = this.GetField(this.Context);

        if (draggedField == null)
        {
            this.Stop(false);
            return;
        }

        this.payload = new Telerik.WinControls.UI.PivotFieldList.FieldPayload(draggedField);
    }

    protected override void OnPreviewDragOver(RadDragOverEventArgs e)
    {
        RadElement targetElement = this.DropTarget as RadElement;
        Telerik.WinControls.UI.PivotFieldList.IField targetField = this.GetField(targetElement);

        if (targetElement != null && targetElement.ElementTree.Control == this.fieldList.ReportFiltersControl && this.payload != null)
        {
            foreach (Telerik.WinControls.UI.PivotFieldList.IField field in this.fieldList.ViewModel.Filters)
            {
                if (field.FieldInfo == payload.DraggedField.FieldInfo &&  this.Context is TreeNodeElement ))
                {
                    e.CanDrop = false;
                    this.payload.SetDestination(null);
                    this.payload.RemoveFromSource = false;

                    return;
                }
            }
        }

        base.OnPreviewDragOver(e);
    }

    private Telerik.WinControls.UI.PivotFieldList.IField GetField(object context)
    {
        RadListVisualItem listItem = context as RadListVisualItem;
        TreeNodeElement treeItem = context as TreeNodeElement;
        PivotFieldListItemButton button = context as PivotFieldListItemButton;

        if (button != null)
        {
            listItem = button.Owner;
        }

        Telerik.WinControls.UI.PivotFieldList.IField field1 = null, field2 = null;
        if (listItem != null && listItem.Data != null)
        {
            field1 = listItem.Data.DataBoundItem as Telerik.WinControls.UI.PivotFieldList.IField;
        }

        if (treeItem != null && treeItem.Data != null)
        {
            field2 = treeItem.Data.DataBoundItem as Telerik.WinControls.UI.PivotFieldList.IField;
        }

        return field1 ?? field2;
    }
}
Unplanned
Last Updated: 25 Jan 2019 07:31 by ADMIN
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);
Completed
Last Updated: 10 Jan 2019 12:03 by ADMIN
The issue may manifest if aggregate descriptions are added on the pivot`s column axis and if their member does not return data.
Completed
Last Updated: 27 Nov 2018 11:43 by Bailey
I came across an exception when trying to use the Report Filter area with data that contains blank (DBNull) values.  It looks like the control tries to build a distinct list of values to show in the filter's drop-down, but throws an exception if one of the values is blank.  I attached a ZIP file with a Visual Studio project that demonstrates the issue, and included a Word file to describe how to reproduce the error.  

Any assistance is greatly appreciated.  Thank you.


Drew White
Developer
CRMCulture, LLC

Email:         dwhite@CRMCulture.com
Web:          http://www.crmculture.com
Completed
Last Updated: 11 Oct 2018 14:04 by Dimitar
How to reproduce: 
Me.RadPivotGrid1.DataSource = Nothing

Workaround: 
DirectCast(Me.RadPivotGrid1.DataProvider, LocalDataSourceProvider).ItemsSource = Nothing
Dim viewModel = Me.RadPivotGrid1.PivotGridElement.GetType().GetField("viewModel", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me.RadPivotGrid1.PivotGridElement)
viewModel.GetType().GetProperty("DataProvider").SetValue(viewModel, Nothing)
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.
Unplanned
Last Updated: 06 Dec 2017 15:10 by ADMIN
Completed
Last Updated: 29 Nov 2017 14:07 by ADMIN
Completed
Last Updated: 28 Nov 2017 06:45 by ADMIN
The new API would allow some of the default functions to be removed and custom aggregate functions to be added. At the moment the dialog can be modified like this:

Public Class MyAggregateOptionsDialog
    Inherits AggregateOptionsDialog

    Private availableAggregateFunctions As IList(Of AggregateFunction) = New List(Of AggregateFunction)() From {
        AggregateFunctions.Sum,
        AggregateFunctions.Count,
        AggregateFunctions.Average,
        AggregateFunctions.Max,
        AggregateFunctions.Min,
        AggregateFunctions.Product,
        AggregateFunctions.StdDev,
        AggregateFunctions.StdDevP,
        AggregateFunctions.Var,
        AggregateFunctions.VarP,
        New SqrtSumAggregateFunction()
    }

    Public Overrides Sub LoadSettings(aggregateDescription As PropertyAggregateDescriptionBase)
        MyBase.LoadSettings(aggregateDescription)

        Dim listAggregateFunctions = DirectCast(Me.GetType().BaseType.GetField("listAggregateFunctions", BindingFlags.NonPublic Or BindingFlags.Instance).GetValue(Me), RadListControl)
        listAggregateFunctions.DataSource = availableAggregateFunctions
    End Sub
End Class