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

Creating new docked Docks, at bottom of DockZone

4 Answers 84 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 07 Apr 2008, 08:57 PM
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?


4 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 09 Apr 2008, 12:43 PM
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
0
Jeff
Top achievements
Rank 1
answered on 09 Apr 2008, 02:19 PM
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.


0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 10 Apr 2008, 11:18 AM
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.
0
Jeff
Top achievements
Rank 1
answered on 10 Apr 2008, 08:21 PM
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.





Tags
Dock
Asked by
Jeff
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Share this question
or