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

Visibility of RadDock objects

2 Answers 87 Views
Dock
This is a migrated thread and some comments may be shown as answers.
hkdave95
Top achievements
Rank 2
hkdave95 asked on 23 Jun 2008, 11:28 PM
Hi

What is the best way to control the visibility of a RadDock object ?

  • RadDock1.Closed = True/False ?
  • RadDock1.Visible = True/False ?

I need to display and hide certain Docks at various times so which is the best way.

I have tried both methods so far but have problems persisting thier state.

My aspx ..

                    <telerik:RadDockLayout runat="server" ID="darrdlPostIts" EnableViewState="true" StoreLayoutInViewState="true">  
                        <telerik:RadDock  ID="darrdPostIt00" Title="&nbsp;" Width="190px" Top="200px" Left="550px" DefaultCommands="All" Pinned="true" DockMode="Floating" runat="server" EnableEmbeddedSkins="false" Skin="PostIt" EnableViewState="true" EnableAjaxSkinRendering="true">  
                        </telerik:RadDock>   
                        <telerik:RadDock  ID="darrdPostIt01" Title="&nbsp;" Width="190px" Top="200px" Left="550px" DefaultCommands="All" Pinned="true" DockMode="Floating" runat="server" EnableEmbeddedSkins="false" Skin="PostIt" EnableViewState="true" EnableAjaxSkinRendering="true">  
                        </telerik:RadDock>   
                        <telerik:RadDock  ID="darrdPostIt02" Title="&nbsp;" Width="190px" Top="200px" Left="550px" DefaultCommands="All" Pinned="true" DockMode="Floating" runat="server" EnableEmbeddedSkins="false" Skin="PostIt" EnableViewState="true" EnableAjaxSkinRendering="true">  
                        </telerik:RadDock>   
                        <telerik:RadDock  ID="darrdPostIt03" Title="&nbsp;" Width="190px" Top="200px" Left="550px" DefaultCommands="All" Pinned="true" DockMode="Floating" runat="server" EnableEmbeddedSkins="false" Skin="PostIt" EnableViewState="true" EnableAjaxSkinRendering="true">  
                        </telerik:RadDock>   
                        <telerik:RadDock  ID="darrdPostIt04" Title="&nbsp;" Width="190px" Top="200px" Left="550px" DefaultCommands="All" Pinned="true" DockMode="Floating" runat="server" EnableEmbeddedSkins="false" Skin="PostIt" EnableViewState="true" EnableAjaxSkinRendering="true">  
                        </telerik:RadDock>   
                    </telerik:RadDockLayout> 
 

Kind Regards

David

2 Answers, 1 is accepted

Sort by
0
-DJ-
Top achievements
Rank 1
answered on 24 Jun 2008, 01:36 PM

Hi David,

I would like to think that setting the visibility to false should be sufficient, but I'm sure that if you explicitly call some databinding methods on the dock they still get executed, adding some overhead to the application.

Not sure how it works if it's set to close.

Personally I find it easiest to manage state by using autopostback on all commands and then writing the state of each dock in a cookie.

Regards,

-DJ-

0
Petio Petkov
Telerik team
answered on 24 Jun 2008, 02:46 PM

Hi,

You should use the RadDock.Closed property. All RadDocks are enclosed with a RadDockLayout so everything related to the state should be OK. 



Greetings,

Petio Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
hkdave95
Top achievements
Rank 2
Answers by
-DJ-
Top achievements
Rank 1
Petio Petkov
Telerik team
Share this question
or