Databinding to a checkbox

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

    Databinding to a checkbox

    Hi,

    I have a datafield containing Y or N. I would like to databind to the
    checkbox, and tell it that Y denotes the checked state and N denotes the
    unchecked state. In fact, I would like to be able to do something like this
    to arbitrary values which should denote the checked and uncheck state (i.e.
    'Available' for checked and 'Unavailable' for unchecked).

    Is this possible?

    Thanks


  • Claes Bergefall

    #2
    Re: Databinding to a checkbox

    Check out the Parse and Format events in the Binding class

    /claes

    "Marina" <someone@nospam .com> wrote in message
    news:OeGc$lypEH A.1164@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hi,
    >
    > I have a datafield containing Y or N. I would like to databind to the
    > checkbox, and tell it that Y denotes the checked state and N denotes the
    > unchecked state. In fact, I would like to be able to do something like[/color]
    this[color=blue]
    > to arbitrary values which should denote the checked and uncheck state[/color]
    (i.e.[color=blue]
    > 'Available' for checked and 'Unavailable' for unchecked).
    >
    > Is this possible?
    >
    > Thanks
    >
    >[/color]


    Comment

    • Marina

      #3
      Re: Databinding to a checkbox

      Ok, thanks. That can do the trick, though what a pain.

      "Claes Bergefall" <claes.bergefal l@online.nospam > wrote in message
      news:eEiuQI4pEH A.348@TK2MSFTNG P15.phx.gbl...[color=blue]
      > Check out the Parse and Format events in the Binding class
      >
      > /claes
      >
      > "Marina" <someone@nospam .com> wrote in message
      > news:OeGc$lypEH A.1164@TK2MSFTN GP10.phx.gbl...[color=green]
      > > Hi,
      > >
      > > I have a datafield containing Y or N. I would like to databind to the
      > > checkbox, and tell it that Y denotes the checked state and N denotes the
      > > unchecked state. In fact, I would like to be able to do something like[/color]
      > this[color=green]
      > > to arbitrary values which should denote the checked and uncheck state[/color]
      > (i.e.[color=green]
      > > 'Available' for checked and 'Unavailable' for unchecked).
      > >
      > > Is this possible?
      > >
      > > Thanks
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...