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

Add new radform as tollwindow?

1 Answer 51 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Pirx
Top achievements
Rank 1
Pirx asked on 12 Feb 2013, 11:55 AM
Hi,

I'm new to Telerik and testing it, so my question is probably simple, but after some experiments I must confess, I am confused.
My scenario is very simple: the user click on the button (ribbon) and a new search result (grid) should appear as a new form inside of the toolwindow. At the beginning, there is no toolwindow at all. Each new result should be contained in the same, only one, toolwindow (tooltabstrip?), so the user can float it all at once.

I tried to use:              

if (host == null)
    {
        host = this.radDock1.DockControl(form, DockPosition.Left);
    }
    else
    {
        this.radDock1.DockControl(form, host, DockPosition.Fill);
    }


It seems to be working fine, but, when I float this tollwindow and use the procedure obove I the floating state, then, after docking (per double click), all the windows created in the floated state, appeared as additional toolwindows.

My questions are:

  1. Why?
  2. What is the proper way to handle my scenario?

 

Thanks.

Pirx  

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 14 Feb 2013, 03:11 PM
Hello Pirx,

Thank you for writing.

Then the host window is already created you can use
DisplayWindow API instead of new re-dock operation:
if (host == null)
{
    host = this.radDock1.DockControl(form, DockPosition.Left);
}
else
{
    this.radDock1.DisplayWindow(host);
}

I hope this helps.

All the best,
Julian Benkov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
Dock
Asked by
Pirx
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or