Format in aspx datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

In my datagrid I have following line :
<asp:BoundColumn DataField="VervalDt" HeaderText="Vervaldatum"
DataFormatString="{0:d}"></asp:BoundColumn>

But I want an empty column when my datafield (VervalDt) = 01/01/0001 (=
DateTime.MinValue)

So, if my date = 01/01/0001 I want to put an empty string in that column,
otherwise the date.

Somebody know how to fix that?

Thanks,
Jac
 
Hi Jac:

You could replace the min time with a null value in those rows where
mintime appears. Another option is to override the ItemDataBound
event of the grid, look for the min time in the controls, and replace
the cell contents with a space.

HTH,
 
Back
Top