2
Reply

Add Data To A Control From One Class To Another

james.smith

james.smith

May 12 2004 3:40 PM
2k
This is the problem. I can add data to a combobox if it is in the same class. For example: String x = "Test"; combobox1.Item.Add(x); But if I have the data in another class I cannot add it. For example String x = "Test"; Form1 myForm = new Form1(); myForm.combobox1.Item.Add(x); But it does not work. Any ideas? I am new to C#, so sorry if this is simple. I don't get an error, but it doesn't load the data to the combo box. I can't seem to get data from one class into a control in another.

Answers (2)