Results 1 to 5 of 5

Thread: binding doesn't work when updating from another form

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    10

    binding doesn't work when updating from another form

    hi Pros and Gurus,
    in form1 I put the following code:
    Code:
    dim frm as new form2
    frm.Form2DS1= Form1Ds1
    frm.show
    in form2 I binded the text boxes to Form2DS1 during design time but when running the application no value is displayed.


    can you help me??

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    It's late night here and I dont have a solid explanation why this happens, all I can say is that binding is done before dataset is populated, and strange enough controls are not updated afterwards. As a quick solution move all of your binding statments to form_load event. I will work on it later.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    As an alternative solution you can pass dataset of form1 to constructor of form2, but remember that, in this case you dont need to have a new instance of dataset at from2, so you may remove that line from the wizard generated code.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Data Binding is hell .

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    10
    thank you Lunatic3 ...

    it works GREAT!!

    Although I didn't understand ur second solution but the first one was great enough

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