|
-
Dec 30th, 2003, 04:19 AM
#1
Thread Starter
New Member
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??
-
Dec 30th, 2003, 06:33 AM
#2
Frenzied Member
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
-
Dec 30th, 2003, 07:07 AM
#3
Frenzied Member
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
-
Dec 30th, 2003, 07:13 AM
#4
Sleep mode
Data Binding is hell .
-
Dec 30th, 2003, 08:47 AM
#5
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|