I have one DataTable like this:
Attribute Percentage ReferenceAmount TaxAmount
------------ ------------ ---------------- -----------
Sales 5.00 5000 250
VAT 2.00 250 5
Discount 0 0 100
I want to Bind this DataTable with one GridView.
But in the GridView, I dont want to display 0. Instead of Zero, I just want leave that cell as empty. I dont want to display any other thing if that contains Zero.
How to replace EmptyString instead of Zero in the DataTable?
The following GridView DataBound method will loop through every cell in the GridView and replace “0” with an empty string: