This is a migrated thread and some comments may be shown as answers.

Add dynamic control in dynamic form

2 Answers 103 Views
Form
This is a migrated thread and some comments may be shown as answers.
Andre
Top achievements
Rank 1
Andre asked on 03 Aug 2011, 11:42 PM
Hi,
I am creating a dynamic form and after adding dynamic controls but i receive this message (" The best overloaded method match for 'System.Windows.Forms.Control.ControlCollection.Add(System.Windows.Forms.Control)' has some invalid arguments  ")
and (" cannot convert from 'Telerik.WinControls.UI.RadGroupBox' to 'System.Windows.Forms.Control' ")

Here is the code:
Form frm = new Form();
RadGroupBox groupb = new RadGroupBox();
frm.Controls.Add(groupb);

Can you help me?

2 Answers, 1 is accepted

Sort by
0
Andre
Top achievements
Rank 1
answered on 04 Aug 2011, 02:17 PM
Ok, solved.

I add reference telerik.WinControls and now works ok.
0
Stefan
Telerik team
answered on 09 Aug 2011, 08:47 AM
Hello Andre,

I am glad to hear that you have solved the case. Should you have any other questions, do not hesitate to contact us.

All the best,
Stefan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Form
Asked by
Andre
Top achievements
Rank 1
Answers by
Andre
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or