UserDockForm

7 posts, 0 answers
  1. erwin
    erwin avatar
    369 posts
    Member since:
    Dec 2006

    Posted 11 Jun 2009 Link to this post


    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
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 11 Jun 2009 Link to this post

    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
  3. erwin
    erwin avatar
    369 posts
    Member since:
    Dec 2006

    Posted 12 Jun 2009 Link to this post

    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 (?)
  4. Amry Hanitijo
    Amry Hanitijo avatar
    6 posts
    Member since:
    Jan 2009

    Posted 13 Jun 2009 Link to this post

    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

  5. raju
    raju avatar
    15 posts
    Member since:
    Feb 2009

    Posted 13 Jun 2009 Link to this post

    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

  6. erwin
    erwin avatar
    369 posts
    Member since:
    Dec 2006

    Posted 13 Jun 2009 Link to this post

    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
  7. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 17 Jun 2009 Link to this post

    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.
Back to Top