Hello
How can I make the grid to display nothing when the value is zero?
Thanks a lot
Hi EmoscosoCam,
If you want to display a null value in the cell you may need to assign it a string type. Assuming our column name is "Zero", in the Grid's Initialize_Row adding the following code snippet:
string i = e.Row.Cells["Zero"].Value.ToString(); string zero = "0"; if (string.Compare(i,zero)==0){ e.Row.Cells["Zero"].Value = null;
This will display a null value in the cell.
Thanks.
By the way, is the value is greater that zero, I have a format string the displays it as a percentage.