Alternate Row Color

2 posts, 1 answers
  1. KUMARAN
    KUMARAN avatar
    28 posts
    Member since:
    May 2014

    Posted 26 Jan 2015 Link to this post

    Is there any possible way to set alternate row color for 
    Pivot Grid fields like RadGridView  
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 29 Jan 2015 Link to this post

    Hi Kumaran,

    Thank you for contacting us.

    You can use the CellFormatting event to set the BackColor of the rows:
    void radPivotGrid1_CellFormatting(object sender, PivotCellEventArgs e)
    {
        if (e.CellElement.Row.Index % 2 == 0)
        {
            e.CellElement.BackColor = Color.Red;
            e.CellElement.GradientStyle = GradientStyles.Solid;
        }
        else
        {
            e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local);
        }
       
    }
     
    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    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 WinForms is Visual Studio 2017 Ready
Back to Top