Color Code PivotGrid Cells

4 posts, 0 answers
  1. Owen
    Owen avatar
    4 posts
    Member since:
    Feb 2011

    Posted 06 Feb 2015 Link to this post

    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
  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 11 Feb 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Owen
    Owen avatar
    4 posts
    Member since:
    Feb 2011

    Posted 11 Feb 2015 in reply to Eyup Link to this post

    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.

  5. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 16 Feb 2015 Link to this post

    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.

     
Back to Top