Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
using form 1 to display database from sql server 2005 to a form 2
Posted
Comments
[no name] 29-Aug-13 7:10am    
And that is supposed to mean what?

Encapsulate your data in one class so content updating is done using two accessor methods: GetData() and SetData(). Add also one public event named DataChanged and trigger it after Data is changed with the SetData() method.

On creation from the master Form, pass this data instance to child forms. Child forms (or even the main form itself) who care about data changes only have to be linked to the Changed event and update the displayed information when the event is triggered.

Hope it works.

p.d. Search for delegate usages in order to see how events are implemented.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900