Reformatting data in datagrid column

Discussion in 'ASP .Net Datagrid Control' started by flashgorman, Oct 1, 2003.

  1. flashgorman

    flashgorman Guest

    Hi,

    I have a datagrid column which is bound to a database boolean field which is
    always 0 or 1. What I want to do is show the words "on" or "off" in the
    column rather than the actual 0 or 1 value. Is this possible?

    TIA

    --
    Flash Gorman.
    www.flashgorman.com
    flashgorman, Oct 1, 2003
    #1
    1. Advertising

  2. flashgorman

    ShamusFu Guest

    Are you using Visual Basic?

    If so, you can use the IIF function.

    If not, you can write a code-behind subroutine and pass it the boolean
    value.


    "flashgorman" <> wrote in message
    news:blehju$b2ldv$-berlin.de...
    > Hi,
    >
    > I have a datagrid column which is bound to a database boolean field which

    is
    > always 0 or 1. What I want to do is show the words "on" or "off" in the
    > column rather than the actual 0 or 1 value. Is this possible?
    >
    > TIA
    >
    > --
    > Flash Gorman.
    > www.flashgorman.com
    >
    >
    ShamusFu, Oct 1, 2003
    #2
    1. Advertising

  3. flashgorman

    flashgorman Guest

    "ShamusFu" <> wrote in message
    news:OISQ0%...

    > "flashgorman" <> wrote in message
    > news:blehju$b2ldv$-berlin.de...
    > > Hi,
    > >
    > > I have a datagrid column which is bound to a database boolean field

    which
    > is
    > > always 0 or 1. What I want to do is show the words "on" or "off" in the
    > > column rather than the actual 0 or 1 value. Is this possible?
    > >
    > > TIA


    > Are you using Visual Basic?
    >
    > If so, you can use the IIF function.
    >
    > If not, you can write a code-behind subroutine and pass it the boolean
    > value.
    >

    Cheers. I'm not using VB so I'll look into the code behind business.
    flashgorman, Oct 2, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Curt
    Replies:
    3
    Views:
    1,859
    Sahil Malik
    Jun 18, 2004
  2. Chris Lane
    Replies:
    3
    Views:
    384
    Chris Lane
    Nov 17, 2003
  3. Lloyd Sheen

    Why the reformatting

    Lloyd Sheen, Nov 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    315
    Lloyd Sheen
    Nov 24, 2003
  4. Lloyd Sheen

    Brain Dead Reformatting

    Lloyd Sheen, Jan 24, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    334
    Lloyd Sheen
    Jan 24, 2004
  5. carlos perez
    Replies:
    0
    Views:
    405
    carlos perez
    Jun 8, 2004
Loading...

Share This Page