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

Clear Docks from a Zone

3 Answers 81 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Adriano
Top achievements
Rank 1
Adriano asked on 14 Sep 2007, 03:08 PM
Hi,

I have been trying to clear the docks from a specific zone... by using Zone.Docks.Clear(), that doesn't seems to work. I know that the RadDockLayout also contains the information about the same docks and that is probrably the reason the Docks.Clear() doesn't work but I can;t find a way to clear docks in a especific Zone... I also know that I can call RadDockLayout.Controls.Clear()... but that would clear everthing else that I want to keep in my ViewState or Session.

Any suggestions?

Thanks,

Adriano

3 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 14 Sep 2007, 04:00 PM
I am using :
RadDock.Closed=true
for all raddocks in the desired zone.
I hope that this will help you.


0
Adriano
Top achievements
Rank 1
answered on 14 Sep 2007, 04:48 PM
Thanks, but I was really trying to remove and recreate as suppose to just hide it.

Adriano
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 20 Sep 2007, 03:56 PM
I tried the following code with the latest version:
       <rad:RadDockLayout ID="RadDockLayout1" runat="server">  
       <rad:RadDockZone ID="RadDockZone1" runat="server">  
                <rad:RadDock ID="RadDock1" runat="server">                      
                </rad:RadDock>             
                <rad:RadDock ID="RadDock2" runat="server">  
                </rad:RadDock> 
        </rad:RadDockZone> 
        <asp:Button ID="btnPostback" runat="server" /> 
    </rad:RadDockLayout>   
and codebehind:
  protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!Page.IsPostBack)  
        {  
            RadDockZone1.Docks.Clear();  
        }  
    } 
On the initial load, the docks are not visible(RadDockZone1.Docks.Clear() ) on the page. After clicking the button, the objects goes visible. 

You can paste your source code and i will try to help you.
Tags
Dock
Asked by
Adriano
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Adriano
Top achievements
Rank 1
Share this question
or