Clear Docks from a Zone

4 posts, 0 answers
  1. Adriano
    Adriano avatar
    16 posts
    Member since:
    Apr 2007

    Posted 14 Sep 2007 Link to this post

    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
  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 14 Sep 2007 Link to this post

    I am using :
    RadDock.Closed=true
    for all raddocks in the desired zone.
    I hope that this will help you.


  3. Adriano
    Adriano avatar
    16 posts
    Member since:
    Apr 2007

    Posted 14 Sep 2007 Link to this post

    Thanks, but I was really trying to remove and recreate as suppose to just hide it.

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

    Posted 20 Sep 2007 Link to this post

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