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

UserDockForm

6 Answers 80 Views
Dock
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
erwin asked on 11 Jun 2009, 07:11 AM

What's the best way to convert UserDockForm derived Dockables to the new DocumentWindow?

Do I have to convert them to Controls and then add them to the DocumentWindow.Controls Collection?

regards
Erwin

6 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 11 Jun 2009, 09:35 AM
Hi,

You can use your approach and convert to Control and then add to DocumentWindow Controls collection. Another solution is to convert to Form and add to the form to the RadDock using HostWindow.

Form form = new Form(); 
RadGridView gridView = new RadGridView(); 
gridView.Dock = DockStyle.Fill; 
form.Controls.Add(gridView); 
form.Visible = true
        
HostWindow hostWindow = new HostWindow(form); 
radDock1.AddDocument(hostWindow); 

Do not hesitate to write me back if you have further questions.

Best Regards,
Julian
0
erwin
Top achievements
Rank 1
Veteran
answered on 12 Jun 2009, 11:31 AM
My current approach:

MyUserControl muc = new MyUserControl()  
 
DocumentWindow dw = new DocumentWindow();  
dw.Controls.Add(muc);  
 
radDock1.AddDocument(muc);  
 

I noticed that the Load Event is not triggered in the UserControl (?)
0
Amry Hanitijo
Top achievements
Rank 1
answered on 13 Jun 2009, 06:25 AM
Hi Erwin,

Yes, you are correct Load Event is not triggered.
 
I am using the below approch and it works very well.

Private

 

Sub crewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles crewButton.Click

 


Dim crewhostWindow As HostWindow = New HostWindow(crewForm)
crewhostWindow.AllowDockStates = AllowDockStates.TabbedDocument
crewForm.Show()
crewForm.Dock = DockStyle.Fill
RadDock1.AddDocument(crewhostWindow)

End Sub

regards
raju

0
raju
Top achievements
Rank 2
answered on 13 Jun 2009, 06:35 AM
Hi Erwin,

Yes, you are correct Load Event is not triggered.
 
I am using the below approch and it works very well.

Private

 

Sub crewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles crewButton.Click

 

 


Dim crewhostWindow As HostWindow = New HostWindow(crewForm)
crewhostWindow.AllowDockStates = AllowDockStates.TabbedDocument
crewForm.Show()
crewForm.Dock = DockStyle.Fill
RadDock1.AddDocument(crewhostWindow)

End Sub

Note to Admin:
Please correct login bug, I posted earlier message, but it shows under "Amry Hanitijo".


regards
raju

0
erwin
Top achievements
Rank 1
Veteran
answered on 13 Jun 2009, 11:16 AM
raju, thanks for the message.

I think the Load Event not firing is a bug - no problem with my own controls, but 3rd party user controls might rely on the Load Event.

Erwin
0
Julian Benkov
Telerik team
answered on 17 Jun 2009, 08:14 AM
Hello Erwin,

We will probably fix the issue for Q2 2009 -- expected within several weeks. Thank you for the feedback and reported problems. Your Telerik points have been updated.

Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Dock
Asked by
erwin
Top achievements
Rank 1
Veteran
Answers by
Julian Benkov
Telerik team
erwin
Top achievements
Rank 1
Veteran
Amry Hanitijo
Top achievements
Rank 1
raju
Top achievements
Rank 2
Share this question
or