|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Substituting 0 with empty stringHi 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 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 > >
I've lost my drop down list box!
Pop-up Message Box binding ArrayLists to DataGrids-- how to name the columns? Newbie: Datagrid Comes Up Blank?!? Subclassing a DataGrid control HOWTO: Bring that row back into focus ... trying to display header only Wrong window gets the content using datagrid ItemStyle question |
|||||||||||||||||||||||