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

How to set focus on document window?

3 Answers 131 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Saad
Top achievements
Rank 1
Saad asked on 02 Feb 2011, 12:50 PM
Hi Guys,

I have a situation like a tool window is populated with different radforms name. When I click a radform name from the tool window menu list that radform appear in raddock. When user click on different radform name that form will appear.
Now the problem is when click the name of radform which is already opened it couldn't got activated. Any suggestion to resolve the issue. I highly appreciate the reply. Please find the snap shot of the scenario for clear picture. 
Kind Regards.

     

3 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 04 Feb 2011, 02:45 PM
Hello,

When you click on your tree node, in the SelectedNodeChanged event, you would need to select the correct document in the following way

Private Sub RadTreeView1_SelectedNodeChanged(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.RadTreeViewEventArgs) Handles RadTreeView1.SelectedNodeChanged
    Dim windowName As String = e.Node.Text
    CType(Me.RadDock1.DockWindows(windowName), DocumentWindow).Select()
End Sub

Hope that helps
Richard
0
Saad
Top achievements
Rank 1
answered on 05 Feb 2011, 09:10 AM
Hi Richard,

:) Many thanks for the solution it worked with slight change. I used your code as suggested but it required to be casted as "HostWindow". Once again thank you for your prompt reply.
Best Regards,
Saad
0
Richard Slade
Top achievements
Rank 2
answered on 05 Feb 2011, 09:31 AM
Hi Saad,
You're welcome. Glad I could be of help.
Regards,
Richard
Tags
Dock
Asked by
Saad
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Saad
Top achievements
Rank 1
Share this question
or