ASP databinding DataFormatstring boolean

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jac

    ASP databinding DataFormatstring boolean

    Hey,

    I do a databinding and use the following
    <asp:datagrid .....>
    ....
    <asp:BoundColum n DataField="f1" HeaderText... DataFormatStrin g="{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 DataFormatstrin g I receive always a True or a False in my datagrid.
    Can I use DataFormatStrin g 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

  • Shiva

    #2
    Re: ASP databinding DataFormatstrin g boolean

    Hi,

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

    "Jac" <Jac@discussion s.microsoft.com > wrote in message
    news:BA2F076B-06BD-413C-837E-3B1C8A1F006B@mi crosoft.com...
    Hey,

    I do a databinding and use the following
    <asp:datagrid .....>
    ....
    <asp:BoundColum n DataField="f1" HeaderText... DataFormatStrin g="{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 DataFormatstrin g I
    receive always a True or a False in my datagrid.
    Can I use DataFormatStrin g 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


    Comment

    Working...