PivotGrid Export to Datatable

2 posts, 0 answers
  1. Khalid
    Khalid avatar
    11 posts
    Member since:
    Sep 2010

    Posted 24 Oct Link to this post

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

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

     

  2. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 26 Oct Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top