This example demonstrates how to use the ASPxPivotGrid.HtmlFieldValuePrepared event to customize the appearance of a specific Field Value.
BTW: This event was introduced in the ASPxPivotGrid version 10.1, according to the Implement the HtmlCellPrepared and HtmlFieldValuePrepared events suggestion.
Question Comments
Added By: Vincent Harvey at: 6/16/2015 7:51:33 AM
I tried this :
Protected Sub pgTestNewSheet_HtmlFieldValuePrepared(sender As Object, e As PivotHtmlFieldValuePreparedEventArgs) Handles pgTestNewSheet.HtmlFieldValuePrepared
If Object.ReferenceEquals(e.Field, fieldLate) Then
If (e.Value.ToString() = "Y") Then
e.Cell.Style(HtmlTextWriterStyle.BackgroundColor) = ColorTranslator.ToHtml(Color.Red)
End If
End If
End Sub
But in the first "If", e.field gave me "" so it didn't go to the second "If".
Can you help me?
I have created a separate ticket for your question: How to customize Field Values style via the ASPxPivotGrid.HtmlFieldValuePrepared event when e.field is empty let's continue the conversation there.