Add new radform as tollwindow?

2 posts, 0 answers
  1. Pirx
    Pirx avatar
    1 posts
    Member since:
    Jan 2013

    Posted 12 Feb 2013 Link to this post

    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  

  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 14 Feb 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top