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

Move a docked doc from a raddock to another

3 Answers 20 Views
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 20 Feb 2018, 05:31 PM

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 ?

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Feb 2018, 09:17 AM
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.
0
Simon-Pierre
Top achievements
Rank 1
answered on 13 Jul 2018, 07:20 PM

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...

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Jul 2018, 09:01 AM
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.
Tags
Dock
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Simon-Pierre
Top achievements
Rank 1
Share this question
or