ASP databinding DataFormatstring boolean

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

Guest

Hey,

I do a databinding and use the following
<asp:datagrid .....>
....
<asp:BoundColumn DataField="f1" HeaderText... DataFormatString="{0:d}">..

This works fine for a date.

Now, I have also another column but the bounded field is of the type boolean, when I use the binding of that column without DataFormatstring I receive always a True or a False in my datagrid.
Can I use DataFormatString to format as follows : when value of the bounded field = True the client has too see "OK", when the value is false the client has too see "Not OK".

tkx,
Nic
 
Hi,

Check this one out: http://www.datagridgirl.com/faq.aspx (first question in
the list)

Hey,

I do a databinding and use the following
<asp:datagrid .....>
....
<asp:BoundColumn DataField="f1" HeaderText... DataFormatString="{0:d}">..

This works fine for a date.

Now, I have also another column but the bounded field is of the type
boolean, when I use the binding of that column without DataFormatstring I
receive always a True or a False in my datagrid.
Can I use DataFormatString to format as follows : when value of the bounded
field = True the client has too see "OK", when the value is false the client
has too see "Not OK".

tkx,
Nic
 
Back
Top