Hi eXtreme,
Welcome to MSDN newsgroup.
As for the accessing controls from different form, and sharing data
problem, I think we can use the following approachs to resolve it:
1. For Data displaying / manipulating GUI problem, we're recommended to
sparate the UI and the data. Typically, many ones are using the MVC
design-pattern for such scenario:
#Implementing MVC Design Pattern in .NET
http://www.c-sharpcorner.com/Code/20.../MVCDesign.asp
#UIPAB Part 2 : MVC, UIPAB Essentails and Demo
http://www.codeproject.com/dotnet/UIPAB2.asp
For your scenario, I think we can define a certain Data container class
which hold the underlying datas (which will be used to fill the controls on
the form). This class has some member properties which hold the reference
of the List, Array, DataSet/DataTable.....
Then, in our Form/SubForm's constructor, we will pass an instance of this
class. And when we need to displaying data on the form, we just retrieve
the data from that member instance and bind data to the controls on the
form. Also, when open a sub form, we provide the member property in the
parent form in the construction of the sub form(sub form also has a certain
field/propety to hold this reference). Thus, when user take action on the
subform to modify data, we just update that object instance in subform's
code and the parent form can directly retrieve the updated fresh data from
the same instance. How do you think of this?
If there're anything unclear, please feel free to post here. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)