Move a docked doc from a raddock to another

4 posts, 0 answers
  1. dlizarralde
    dlizarralde avatar
    5 posts
    Member since:
    Sep 2016

    Posted 20 Feb 2018 Link to this post

    Hello,

    I have an application on 2 screens. I want to dock controls on the 2 screens and move them from one screen to the other screen.

    So, I have to drag drop controls from the first raddock to the second and back but I didn't found any solution to do it.

    Is there a solution ?

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3958 posts

    Posted 21 Feb 2018 Link to this post

    Hello, Alexandre, 

    Thank you for writing.  

    The described functionality for dragging controls inside RadDock is available only at design time. At run time it is not designed to move the controls either between the different windows in the same RadDock or between two RadDock controls in different applications.

    You can refer to the following article which demonstrates a general approach for achieving drag and drop functionality between two WinForms applications. You can manage the Controls collection of each of the forms and add/remove the desired control. It is up to you what exactly custom functionality you will implement: https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications 

    I hope this information helps. Should you have further questions I would be glad to help. 
     
     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Simon-Pierre
    Simon-Pierre avatar
    1 posts
    Member since:
    Jun 2018

    Posted 13 Jul 2018 Link to this post

    Hello,

     

    Did somebody find out a ''workaround" for that!

     

    I have the same situation. I have programmed a very nice application with a ribbon and I can detect what kid of form is active in my Raddock so the menu in the ribbon is dynamic.

     

    Since a lot of people have 2 screens right now, I was thinkg of , in the same application, start the same master_form ( where my ribbon is) and then with drag and drop or a button be able to ship my documentwindow to the other screen ( with the exact same layout since it is just another instance of my form).

     

    But this code doesn't work

     

     RadForm CurrentActiveDockWindows = (RadForm)((Telerik.WinControls.UI.Docking.HostWindow(RadDock1.DocumentManager.ActiveDocument)).MdiChild;          

     

    TheOtherScreen.RadDock1.DockControl(CurrentActiveDockWindows, Telerik.WinControls.UI.Docking.DockPosition.Fill, Telerik.WinControls.UI.Docking.DockType.Document);

     

    Maybe it is me that doesn't understand (I'm new to telerik) I think that I'm transfering the radform of the doccumentDock element here... but I want to transfert all the DocumentElement on the other side...

     

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3958 posts

    Posted 16 Jul 2018 Link to this post

    Hello, Simon-Pierre,    

    RadDock still is not intended to support such kind of functionality at run time. If you have two separate forms, you can refer to the article from the previous reply demonstrating how to achieve drag and drop functionality in WinForms. Thus, when handling the drop operation you can programmatically create a RadDock with a DocumentWindow and the desired controls in the target form. The following help articles are quite useful about creating RadDock at run time:
    https://docs.telerik.com/devtools/winforms/dock/object-model/creating-a-raddock-at-runtime
    https://docs.telerik.com/devtools/winforms/dock/object-model/creating-toolwindow-and-documentwindow-at-runtime

    I hope this information helps. If you have any additional questions, please let me know.  
     
    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top