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; } } |