ASP databinding DataFormatstring boolean

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
 
S

Shiva

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top