Hello,
I want to display "N/A" in the pivot grid when the values are -1
my datasource is flatdatasource
is is possible?
Thanks,
Hi
You can this by using CellControlAttached event of pivot grid. Below is a snippet:
pivotGrid.CellControlAttached += new EventHandler<Infragistics.Controls.Grids.PivotCellControlAttachedEventArgs>(pivotGrid_CellControlAttached);
void pivotGrid_CellControlAttached(object sender, Infragistics.Controls.Grids.PivotCellControlAttachedEventArgs e){ if (e.Cell.Data is ICell) { ICell cell = e.Cell.Data as ICell; if(cell.Value !=null) { int val; if (int.TryParse(cell.Value.ToString(), out val) && val == -1) { cell.SetValue("NA", null, null); } } }}
Thanks alot
but there is something very weird going on,
when i load the page, it gives me the -1 values not the NA
but when i scroll down the grid, then i scroll up, i found the -1 turned to be NA
and the down half values are still -1,
means the hidden part is NA
why is that?