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

Color Code PivotGrid Cells

3 Answers 92 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Owen
Top achievements
Rank 1
Owen asked on 06 Feb 2015, 09:15 PM
I am wondering how I can color code individual cells based on data from a table in a RadPivotControl.  I do not want to color code the Totals rows or columns.  My row has the values Neonate, Infant, Child, and Adult.  My Columns are 2012, 2013, 2014.  The color code is based on a national average of mortality rates and can change from one year to the next.  So an expected value for a neonate in 2012 is between 1 and 2% while 2013 is 0.5-1.5%.  If my neonate mortality rate in 2012 is 2% then I am GREEN.  However if my mortality rate is 2% for 2013 then I am RED.  Please let me know the best method to accomplish this.

Owen

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 11 Feb 2015, 11:58 AM
Hi Owen,

You can use the approach demonstrated in the following article to achieve this requirement:
http://blogs.telerik.com/aspnet-ajax/posts/13-12-03/aspnet-pivot-table-made-easy

Hope this helps.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Owen
Top achievements
Rank 1
answered on 11 Feb 2015, 02:28 PM
Thank you for the response.  What I want to know is there a way to say the following:
If FREIGHT for Montreal, Canada in 1996 < 100 then color code the cell Green ELSEIF > 120 then color code the cell RED
If FREIGHT for Vancouver, Canada in 1996 < 110 then color code the cell Green ELSEIF > 125 then color code the cell RED
If FREIGHT for Montreal, Canada in 1997 < 90 then color code the cell Green ELSEIF > 100 then color code the cell RED
If FREIGHT for Vancouver, Canada in 1997 < 115 then color code the cell Green ELSEIF > 135 then color code the cell RED

I need to find a specific cell and compare to a specific value.  Not just use the column to compare to a value.

0
Eyup
Telerik team
answered on 16 Feb 2015, 11:52 AM
Hi Owen,

I'm afraid this requirement is not supported. RadPivotGrid is a control designed specifically for data-summary preview. It is not suitable for per individual record display, but rather for calculating and demonstrating a summarized, min, max, etc. value for a group of records. In this sense, the string names of the groups are available only in the row and column headers.

You may check the RadGrid control to see whether it is applicable in your scenario:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/group-footers/defaultcs.aspx

Please feel free to turn to us if new questions arise.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PivotGrid
Asked by
Owen
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Owen
Top achievements
Rank 1
Share this question
or