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

How do you from Floating Window access the parent radDock object?

1 Answer 62 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Robert Kozar
Top achievements
Rank 1
Robert Kozar asked on 09 Aug 2011, 03:20 AM
Hi,

I am trying to allow the ability from a FloatingWindow to open a DocumentWindow in the parent form RadDock object but its null.

Here is how I am doing it as a Docked ToolWindow, but it changes to FloatingWindow when I undock it and the parentform of that is now null.

string itemName = rows[0].GetProperty("Name").ToString();
               
DocumentWindow documentTop = new DocumentWindow();
documentTop.Text = itemName;
documentTop.DocumentButtons = DocumentStripButtons.All;

//dosnt want to add a document because I cannot find the Form that opened this.

if (this.ParentForm is FloatingWindow)
{
    //todo: find a way to call the DockManager and add a new document.
}

//this works only when the ToolWindow object is Docked.
if (this.ParentForm is RadRibbonForm1)
{
     ((RadRibbonForm1)this.ParentForm).radDock1.AddDocument(documentTop);
}



Any Assistance would be helpful.
Thanks,
RK.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 11 Aug 2011, 11:50 AM
Hello Robert,

Thank you for writing.

I am afraid that the design of your application is not clear to me. For this reason I kindly ask you to send me your project, so that I can investigate your case and provide you with adequate support.

The straight-forward way to achieve this can be observed in the attached project. 

I am looking forward to your reply and sample application.
 
Kind regards,
Stefan
the Telerik team

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

Tags
Dock
Asked by
Robert Kozar
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or