CantonMarko
asked on
Suppress zero values in a databound field in a gridview
Can anyone show me a way to make any cell in my gridview that has a zero value show a blank instead of the zero?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select Col1,case when col2 = 0 then ' ' else end, Col3 from tb1
Or
You can loop through
For Each Row in GrdView.Rows
If oRow.Cells("Col2").Value = 0 Then
oRow.Cells("Col2").Value = " "
End iF
Next
Above is a test code. I didnt test it.