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

Adding Tabbed Document

3 Answers 128 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Lorenzo
Top achievements
Rank 1
Lorenzo asked on 17 Sep 2007, 02:04 PM
Hi,
I have one application with one docking manager that contains some dockPanels and some tabbed documents.
I want to add a tabbed document (Telerik.WinControls.Docking.DocumentPane)
via C# code... what is the best way to do this?

Thanks for support
Lorenzo

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 18 Sep 2007, 04:08 PM
Hi Lorenzo,

Thank you for contacting us.

You can add a tabbed document using the codeblock below:

DocumentPane docPane = new DocumentPane(); 
docPane.Text = "Test Document"
dockingManager1.SetDocument(docPane); 
 

Hope this helps.

Greetings,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Reid McClanahan
Top achievements
Rank 1
answered on 16 Jul 2008, 05:09 PM
I want to add a tabbed document when a tree node is selected from another docked pane.  Do you have a code snippet that would help me associate the node to the tabbed document so that I dont keep generating new documents each time I click on the same tree node?
0
Julian Benkov
Telerik team
answered on 18 Jul 2008, 11:22 AM
Hi Reid,

You can use Tag property of the tree view node item:

private void radTreeView1_AfterSelect(object sender, RadTreeViewEventArgs e) 
    if (e.Node.Tag is DocumentPane) 
    { 
        ((DocumentPane)e.Node.Tag).Activate(); 
    } 
    else 
    { 
        DocumentPane document = new DocumentPane(); 
        document.Text = "My Document"
        this.dockingManager1.SetDocument(document); 
        e.Node.Tag = document; 
    } 

I hope this helps. Please, don't hesitate to contact us if you have other questions.

Best wishes,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
Lorenzo
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Reid McClanahan
Top achievements
Rank 1
Share this question
or