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

Pivotgrid celldatabound and underlying data

1 Answer 87 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 17 Feb 2016, 12:40 AM
I am trying to format a cell based on the value of another field in the underlying recordset. How do I access those values?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 19 Feb 2016, 04:01 PM

Hello,

RadPivotGrid is specifically designed to visualize calculated data and present the users with logically grouped information:
http://www.telerik.com/blogs/aspnet-pivot-table-made-easy

You can examine its capabilities through our live samples:
http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/firstlook/defaultcs.aspx

The ItemDataBound event is not available with RadPivotGrid because it is not per record control, but rather it is a summarization control in its essence. It uses information from all the records to apply calculations in its core engine and only displays the results in its grid structure. In this sense, you cannot access the items individually and manipulate their data on a singleton basis as with RadGrid.

You can also check the Custom Data Calculations article, which may be exactly what you are looking for:
http://www.telerik.com/help/aspnet-ajax/pivotgrid-custom-data-calculations.html


Maybe you are looking for a RadGrid with a Hierarchy structure integrated with custom aggregate calculations or group footers with Totals:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/group-footers/defaultcs.aspx


For conclusion, it is not possible to implement item-based logic with RadPivotGrid  as you can achieve with other data visualization controls. RadGrid and RadListView for example provide ItemDataBound and ItemCreated events where you can examine the details of every record. RadPivotGrid is specifically designed for calculating large amount of numeric values and it displays only the result from these summaries.

I hope the clarification was helpful.


Regards,

Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
PivotGrid
Asked by
Erik
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or