This is a migrated thread and some comments may be shown as answers.

PivotGrid Export to Datatable

1 Answer 147 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
Khalid
Top achievements
Rank 1
Khalid asked on 24 Oct 2016, 01:48 PM

is it possible to export the Pivot Data to datatable or datasource.

similarly like DevExpress pivot table.
https://documentation.devexpress.com/#WindowsForms/DevExpressXtraPivotGridPivotGridControl_CreateSummaryDataSourcetopic

 

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 26 Oct 2016, 10:49 AM
Hello Khalid,

Thank you for writing.

This type of functionality is not yet supported. You can, however, iterate the added row and column groups, for example like this: 
List<string> columns = new List<string>();
this.radPivotGrid1.PivotGridElement.SuspendLayout(true);
PivotGridGroupTraverser traverser = (PivotGridGroupTraverser)this.radPivotGrid1.PivotGridElement.ColumnScroller.Traverser.GetEnumerator();
traverser.Reset();
while (traverser.MoveNext())
{
    columns.Add(traverser.Current.Name);
}
 
this.radPivotGrid1.PivotGridElement.ResumeLayout(true, true);

The pivot cells can be extracted by using the RadPivotGrid.PivotGridElement.GetCellElement method. You need to pass as parameters appropriate row and column nodes.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
Tags
PivotGrid and PivotFieldList
Asked by
Khalid
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or