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

Hide the RadDock Layout

6 Answers 167 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Raja
Top achievements
Rank 1
Raja asked on 06 Jul 2007, 12:19 PM
Hi,
        I am using the RadDock Prometheus controls to move the RadDock objects to get the objects in the zone re-allign automatically in a RadDockLayout control. Now my requirement is that, can i hide the Rad Dock layout using Client side javascript function.

Please advice on this.

Regards,
Raja

6 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 06 Jul 2007, 12:57 PM
Hello Raja,

You can hide a RadDock control using the following code:
<script type="text/javascript">
function hideRadDock1()
{
    var dock = $get('<%= RadDock1.ClientID %>');
    dock.set_Closed(true);
}
</script>
<telerik:raddock id="RadDock1" runat="server" text="My dock1" />
<input type="button" id="Button1" onclick="hideRadDock1();" value="Hide RadDock1" />

You may also check our client-side API online example for additional information:
http://www.telerik.com/demos/aspnet/prometheus/Dock/Examples/ClientSideAPI/DefaultCS.aspx

Kind regards,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Raja
Top achievements
Rank 1
answered on 07 Jul 2007, 06:44 AM
Hi,
      Thanks for the reply. Your solution is working, but my requirement is to hide the Rad Dock layout so that all the rad dock's get hided when i hide the RadDockLayout.

Please advice on this.

Regards,
Raja.
0
Petya
Telerik team
answered on 07 Jul 2007, 08:31 AM
Hi Raja,

RadDockLayout is not rendered so it does not have any client-side API and you do not need to hide it. If we did not entirely understand what you try to do, please write us again with more detailed information about the specific issue you have.

Kind regards,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Raja
Top achievements
Rank 1
answered on 07 Jul 2007, 09:18 AM
Hi, 
      Thanks for the information. What is the actual reson behind the RadDock Layout. What are all the things that i can do with the layout.

Wht my requirement is i have six zones in my page, all the zones are placed in a RadDockLayout control. i want to hide all the Zones in my page which are in the layout. Bcoz all the Zones are present in one layout, i felt that if i can hide the layout then i need not to require to loop through and hide the zones which are in my layout. Is there any way to do this kind of this with Layout (or) else is it required to progrmatically hide all the zones in the layout.

I think now it is clear.

Regards,
Raja
0
Petya
Telerik team
answered on 07 Jul 2007, 09:30 AM
Hi Raja,

RadDockLayout is used server-side - most importantly for the following methods and events: SaveDockLayout, LoadDockLayout, GetRegisteredDockState().

For your project, I would suggest placing the zones inside a div element and hiding the div when you want to hide all the zones. Here is some sample code:

<telerik:raddocklayout id="RadDockLayout1" runat="server" skin="Default">
        <div id="docksPlaceHolder">
            <telerik:raddockzone id="RadDockZone1" runat="server" orientation="Horizontal" width="700px">
                <telerik:raddock id="RadDock1" runat="server" dockmode="Default"
                    height="280px" title="Dock1" width="200px">
                </telerik:raddock>
                <telerik:raddock id="RadDock2" runat="server" dockmode="Default" height="280px" title="Dock2"
                    width="200px">
                </telerik:raddock>
                <telerik:raddock id="RadDock3" runat="server" dockmode="Docked" height="280px" title="Dock3"
                    width="200px">
                </telerik:raddock>
            </telerik:raddockzone>
            <telerik:raddockzone id="RadDockZone2" runat="server" minheight="300px" width="700px">
                <telerik:raddock id="RadDock4" runat="server" dockmode="Default" height="280px" title="Dock4"
                    width="200px">
                </telerik:raddock>
            </telerik:raddockzone>
        </div>
        </telerik:raddocklayout>
        <input id="Button2" onclick="hideRadDocks();" type="button" value="Hide RadDocks" />
    </div>

    <script type="text/javascript">
        function hideRadDocks()
        {
            document.getElementById("docksPlaceHolder").style.display = "none";
        }
    </script>

Best wishes,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Raja
Top achievements
Rank 1
answered on 07 Jul 2007, 09:38 AM
Hi Petya,
    
        Thanks for the reply. Just before your response i have done the way you said. I had a thought that might be some way to hide the entire layout. Any ways now your sujjestion made the things very much clear about the solution.

Thanks for the advice. Have a nice time.

Regards,
Raja.
Tags
Dock
Asked by
Raja
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Raja
Top achievements
Rank 1
Petya
Telerik team
Share this question
or