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

Alternate Row Color

1 Answer 40 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
KUMARAN
Top achievements
Rank 1
KUMARAN asked on 26 Jan 2015, 12:54 PM
Is there any possible way to set alternate row color for 
Pivot Grid fields like RadGridView  

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 29 Jan 2015, 07:40 AM
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.

 
Tags
PivotGrid and PivotFieldList
Asked by
KUMARAN
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or