how can i load new data into calling form when the called form is closed
for example
I have 2 form:
form A and form B
form A has combobox (which has listitems "Paris", "Rome", "Madrid" =>the listitem comes from database )
form A calls form B (show dialog)
In form B, i add new city for example "London"
when i close form B, i want combobox in form A to load city data again
(now, the list contains "Paris", "Rome", "Madrid", "London")
How can i deal with this problem?
*sorry if my english isn't well
thanks :)
how to load new data into calling form when the called form is closed
Started by yukou, Aug 14 2011 01:15 AM
3 replies to this topic
#1
Posted 14 August 2011 - 01:15 AM
|
|
|
#2
Posted 14 August 2011 - 11:58 AM
Don't close the form (which unloads it) but Hide it instead. Then you can get whatever data you want, then close the form.
#3
Posted 15 August 2011 - 10:06 PM
Do you add the new value (London) to the database in form B? If so, you can reload the combobox in form A when form A regains focus (OnFocus event).
#4
Posted 18 August 2011 - 08:17 AM
thanks for the answers mate
but i had found the answers
Just share what i'd found
-make a public function to get value from form B -->for example public function gettingvalue()
-pass object form A to form B
-override form B 's constructor
-make object form A in form B
- call gettingvalue() when form B is closed
but i had found the answers
Just share what i'd found
-make a public function to get value from form B -->for example public function gettingvalue()
-pass object form A to form B
-override form B 's constructor
-make object form A in form B
- call gettingvalue() when form B is closed
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









