Access Cell

6 posts, 0 answers
  1. Shaun
    Shaun avatar
    39 posts
    Member since:
    Sep 2012

    Posted 25 Mar 2013 Link to this post

    HI,

    Just installed the latest release,  Q1 2013 SP1 (version 2013.1.321)

    RadPivotGrid

    • IMPROVED: Exposed a method for accessing cell values.
    • FIXED: Unable to open the Filter Popup Dialog when filter items contain DBNULL values.


    How do I access the cell values as stated above?

    Also is it possible to add a calculation field to a pivot grid?

    Cheers

    Shaun.

  2. Peter
    Admin
    Peter avatar
    1160 posts

    Posted 28 Mar 2013 Link to this post

    Hello Shaun,

    Thank you for writing.

    You should use the RadPivotGridElement's 
    GetAggregateValue method in order to access cells value. Refer to the method signature:
    public CellAggregateValue GetAggregateValue(IGroup row, IGroup column, bool collapsedRow, bool collapsedColumn)

    The item concerns a Pivot calculations is still not resolved.

    Should you have any other questions, do not hesitate to contact us.

    Greetings,
    Peter
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  3. Shaun
    Shaun avatar
    39 posts
    Member since:
    Sep 2012

    Posted 08 Apr 2013 Link to this post

    Hi,

    Thanks for that, do you have a code example as I'm not having much luck accessing the cells.

    Cheers

    Shaun. 
  4. Peter
    Admin
    Peter avatar
    1160 posts

    Posted 10 Apr 2013 Link to this post

    Hello Shaun,

    Thank you for writing back.

    You can you this method in this way:
       this.radPivotGrid1.UpdateCompleted += new EventHandler(radPivotGrid1_UpdateCompleted);
       this.FillWithData();           
    }
     
    void radPivotGrid1_UpdateCompleted(object sender, EventArgs e)
    {
        foreach (PivotGroupNode columnNode in this.radPivotGrid1.PivotGridElement.GetColumnGroups())
        {
            foreach (PivotGroupNode rowNode in this.radPivotGrid1.PivotGridElement.GetRowGroups())
            {
                CellAggregateValue value = this.radPivotGrid1.PivotGridElement.GetAggregateValue(columnNode.Group, rowNode.Group, false, false);
                if (!string.IsNullOrEmpty(value.FormattedValue))
                {
                    //deal with the cell value
                }
            }
        }
    }

    I hope this is helpful.

    Do not hesitate to write back anytime you have further questions or need assistance.

    Greetings,
    Peter
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  5. paulo g
    paulo g avatar
    6 posts
    Member since:
    Oct 2012

    Posted 27 Jul 2020 in reply to Peter Link to this post

    Hi

    Can be the cell values modified?

    Regards,

    Paulo

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4169 posts

    Posted 27 Jul 2020 Link to this post

    Hello, Paulo,

    Currently, RadPivotGrid doesn't allow you to edit the aggregated data.

    However, we already have a similar feature request logged in our feedback portalYou can track its progress, subscribe for status changes and add your comments on the following link: https://feedback.telerik.com/winforms/1371023-add-radpivotgrid-end-user-capabilities-for-editing-the-data 

    I hope this information helps.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

Back to Top