CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Location
    asian
    Posts
    116

    radiobutton binding

    Hi!
    Does anyone knows how to bind radiobutton to a field?

    I have a field that only have two possible value like 1 and 2. I want to bind this field to my radiobutton. for example if the field has a value of 1, radiobutton1 should have a check and if the value is 2, the radiobutton2 will be checked. How is this done in VB.net

    Thanks for the help guys!!!
    Thanks!!!
    Kristine

  2. #2
    Join Date
    Jun 2003
    Location
    Kuala Lumpur (Malaysia)
    Posts
    89

    Hmmm....

    Hi..

    As i know, .Net controls does not support array like vb6. So you have to do it programmatically.

  3. #3
    Join Date
    Jun 2003
    Location
    Malaysia (P.J)
    Posts
    410
    This is faily simple as well

    IIf(Rec.Fields(0).Value = 1, RadioButton1.Checked = True, RadioButton2.Checked = True)
    Back after a long hibernation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured