Creating new docked Docks, at bottom of DockZone

5 posts, 0 answers
  1. Jeff
    Jeff avatar
    100 posts
    Member since:
    Apr 2008

    Posted 07 Apr 2008 Link to this post

    There may be a simple answer to this that I have overlooked, but I've not been able to find it.

    I'm dynamically creating new Docks in a DockZone.  The new Docks have DockMode set to Docked.  The DocZone has Orientation = "Vertical".

    When I do:
        RadDocZond1.Controls.Add(dock);
    the new Docks appear at the top of the DocZone.  When I do:
        RadDocZond1.Controls.AddAt(RadDocZond1.Controls.Count, dock);
    the new Docks still appear at the top of the DocZone.

    It's pretty important, for us to get the new Docks to appear beneath the already-existing Docks, rather than above them, and this seems like such a simple thing.  Is there something I'm missing?


  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 09 Apr 2008 Link to this post

    I tried the following code:
    ASPX:
      <telerik:RadDockLayout ID="RadDockLayout1" runat="server">  
            <telerik:RadDockZone ID="RaddockZone1" runat="server" Orientation="Vertical">  
                <telerik:RadDock ID="StaticallyCreatedRadDock" Title="StaticallyCreatedRadDock" runat="server"></telerik:RadDock> 
            </telerik:RadDockZone>     
        </telerik:RadDockLayout> 
    Codebehind:
       protected void Page_Load(object sender, EventArgs e)  
           {             
               RadDock rdo1 = new RadDock();  
               rdo1.Title = rdo1.ID = "DynamicallyRadDock";  
               RaddockZone1.Controls.AddAt(RaddockZone1.Controls.Count, rdo1);  
           } 
    On the client "StaticallyCreatedRadDock" is on postision 0, "DynamicallyRadDock" is on position 1 which is the correct behavior because RadDockZone1.Controls.Count will return 1 in Page_Load.

    Also:
    RadDocZond1.Controls.Add(dock); is equal to
    RadDocZond1.Controls.AddAt(RadDocZond1.Controls.Count, dock);
    and it will add the dock in the last place in the zone
  3. Jeff
    Jeff avatar
    100 posts
    Member since:
    Apr 2008

    Posted 09 Apr 2008 Link to this post

    I don't care about in which position the Docks appear in the array, I care about where they are placed on the page.

    And the resulting dock always appears above the existing docks.


  4. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 10 Apr 2008 Link to this post

    The RadDocks will appears on the client in the same way as they are arranged in the RaddockZone.Controls. If you try the code below (previous post), you will see that the RadDocks are arranged on the client as they arranged in the RadDockZone.Controls collection.

    If you isolate the problem and paste the code  I will try to help you.
  5. Jeff
    Jeff avatar
    100 posts
    Member since:
    Apr 2008

    Posted 10 Apr 2008 Link to this post

    From what I can see, the problem is that when I restore the Docks in Page_Init(), I always restore them in the same order.

    Let it lie.

    I've given up on trying to make RadDockLayout work, and have accomplished what I need with AjaxToolkit.ReorderList.





Back to Top