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

Multiple Instances of the Same Form

1 Answer 260 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Samantha asked on 13 Feb 2015, 02:47 PM
I have a dock with multiple Document Windows.  

I want to open multiple instances of the same form on different document windows.  Each form. although the same, needs to contain different data.

Every time I open a second instance of the form on a second document window, the first instance of the form on the first document window disappears.  The second instance contains the data from the first instance, when it should be maintaining the data from the second document window.

Is there any way to get around this?  

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 17 Feb 2015, 05:00 PM
Hi Samantha,

Thank you for writing.

I am not sure why you are getting such behavior, however you should be able to add the forms properly with the following code:
int count = 0;
private void radButton1_Click(object sender, EventArgs e)
    DocumentWindow newDockWindow = new DocumentWindow();
    newDockWindow.Text = count.ToString();
    newDockWindow.CloseAction = DockWindowCloseAction.Hide;
    RadForm form = new RadForm();
    form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
    form.TopLevel = false;
    form.Dock = DockStyle.Fill;
    RadTextBox box = new RadTextBox();
    box.Text = "Text Box " + count++;
    box.Location = new Point(100, 100);
    radDock1.ActiveWindow = newDockWindow;

I hope this helps. Should you have any other questions do not hesitate to ask.

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question