Completed
Last Updated: 27 Nov 2019 18:44 by ADMIN
Daniel
Created on: 20 Nov 2019 20:19
Category: PivotGrid
Type: Feature Request
1
Export features
Will you be adding the export button features (ShowExportToCsvButton) to the RadPivotGrid like you have in the RadGrid control?
1 comment
ADMIN
Eyup
Posted on: 27 Nov 2019 18:44

Hi Daniel,

 

Currently, there are no plans to add it as a property, however, it can be achieved rather easily using the following approach:

    protected void RadPivotGrid1_ItemCreated(object sender, PivotGridItemCreatedEventArgs e)
    {
        if (e.Item is PivotGridAggregateItem)
        {
            foreach (Control control in e.Item.Controls)
            {
                if (control is PivotGridColumnZone)
                {
                    RadButton button = new RadButton()
                    {
                        ID = "PivotGridExportButton",
                        Text = "Save as Excel"
                    };
                    button.Icon.PrimaryIconCssClass = "rbSave";
                    button.Style["float"] = "right";
                    button.Click += (s, a) =>
                    {
                        RadPivotGrid1.ExportToExcel();
                    };
                    control.Controls.Add(button);
                    break;
                }
            }
        }
    }

 

Regards,
Eyup
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.