Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to customize Field Values style via the ASPxPivotGrid.HtmlFieldValuePrepared event

$
0
0

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?

Added By: John (DevExpress Support) at: 6/16/2015 11:56:08 PM    Hi Vincent,
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.

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>