Articles in this section
Category / Section

How to display customized text as alternate text in the BI PivotGrid

1 min read

You can display a customized text for the for the corresponding cell values via QueryCellFormattedText event. Ensure to set the Handled property to true. The following code explains the same.

C#

EX: set the display text as “NA” for the cell values zero

 

this.pivotGridControl1.InternalGrid.QueryCellFormattedText += new GridCellTextEventHandler(InternalGrid_QueryCellFormattedText);

 

 

void InternalGrid_QueryCellFormattedText(object sender, GridCellTextEventArgs e)

{

if (e.Style.CellValue != null && e.Style.CellValue.ToString().Contains("$0.00"))

{

e.Text = "NA";

e.Handled = true;

}

}

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied