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

Access Cell

5 Answers 151 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
Shaun
Top achievements
Rank 1
Shaun asked on 26 Mar 2013, 03:35 AM

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.

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 28 Mar 2013, 01:54 PM
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.
0
Shaun
Top achievements
Rank 1
answered on 08 Apr 2013, 07:52 AM
Hi,

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

Cheers

Shaun. 
0
Peter
Telerik team
answered on 10 Apr 2013, 02:01 PM
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.
0
paulo g
Top achievements
Rank 1
Veteran
answered on 27 Jul 2020, 11:16 PM

Hi

Can be the cell values modified?

Regards,

Paulo

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Jul 2020, 04:28 AM

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

Tags
PivotGrid and PivotFieldList
Asked by
Shaun
Top achievements
Rank 1
Answers by
Peter
Telerik team
Shaun
Top achievements
Rank 1
paulo g
Top achievements
Rank 1
Veteran
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or