Calling an UserClass object in a different Project and manipulating it on a Form
Please see the attached project....
'Here is the problem..... I don't know how to call Me.UserControl.DataGridUserControl from the main form... What I did is connect two projects, one has a UserClass in it and in it I have a GridView on the UserClass form. What I want to do is be able to load the data into it after I place it on Form1, (in the other project), as I did with the DataGridView1 which is directly on Form1.
'any ideas how to do this? I am thinking that I need to declare it somehow to get it accessable in the Form1
Notice above I declared a "testform" as a usercontrol... I am thinking that somehow I need to declare a variable as UserControl1 but I don't have that selection choice. On top of that I think somehow I am supposed have something like testform.DataGridUserControl so that I can call the DataGridUserControl which is embedded on the UserControl.
Re: Calling an UserClass object in a different Project and manipulating it on a Form
FourBlades,
Thanks for looking at the problem. To be more consise, I have a solution consisting of two projects, say one is called project A and the other is Project B. Now project A has a userControl object in it and project B has the windows Form and is the start up project. So what I need to do is be able to get the UserControl object from A, stick it into B and then connect to it. I know that I can drag the UserControl from the Toolbox onto the Form in B but I can't seem to call it. In this case the UserControl object has a datagridView embedded in it and I want to hook up this datagridview while it is on Form in project B. So I can go into the code in B but don't know how to get this datagridview which is now part of the project B on the Form to display data that is bound to the Form.
Re: Calling an UserClass object in a different Project and manipulating it on a Form
FourBlades,
I figured that problem out. To solve it I created another User Control and stuck it directly into the project, (with the main Form1). I then just called it from there and through the User Control. The user Control is DataGridControl1 and the datagridview control on it is the SongBoxData. So I just call it as in the following example where I add rows to it.