Home All Groups Group Topic Archive Search About
Author
3 May 2005 9:54 PM
Anders K. Jacobsen [DK]
Hi i have a list of objects which I bind to a datagrid

Some of the columns are decimal type and in the database many of the values
are 0. But I need the zeros to beed empty string instead of 0. how could i
easily do that?

Anders

Author
4 May 2005 7:37 AM
Eliyahu Goldin
Anders,

The columns contain strings only. You can make a simple function that will
check if the cell contains "0" and replace it to "" and databind the columns
to this function. Alternatively you can access and change column content in
ItemDataBound event.

Eliyahu

Show quoteHide quote
"Anders K. Jacobsen [DK]" <n***@at.all> wrote in message
news:e0e1zqCUFHA.3544@TK2MSFTNGP12.phx.gbl...
> Hi i have a list of objects which I bind to a datagrid
>
> Some of the columns are decimal type and in the database many of the
values
> are 0. But I need the zeros to beed empty string instead of 0. how could i
> easily do that?
>
> Anders
>
>