I want to change the background color of an entire row based on calculations made.
The problem I am facing in either the CustomAppearance or the CustomDrawCell events is that it iterates through every cell and does the calculation. I want to basically change the row color on column index 0, thus not having to loop through the big data set:
private void pvtGrdCtrlSummaryGrid_CustomDrawCell(object sender, PivotCustomDrawCellEventArgs e)
{
if (e.RowValueType == PivotGridValueType.Value && e.ColumnValueType == PivotGridValueType.GrandTotal && e.ColumnIndex == 0)
{
//Calculations made
//Change the entire row color here
}
}
So I can change each individual cell and it works as expected, but when scrolling it is extremely slow and does not scroll smoothly at all.
I am using a pivotgridcontrol in a C# WinForms app.