Hide the RadDock Layout

7 posts, 0 answers
  1. Raja
    Raja avatar
    21 posts
    Member since:
    Jul 2007

    Posted 06 Jul 2007 Link to this post

    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
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 06 Jul 2007 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Raja
    Raja avatar
    21 posts
    Member since:
    Jul 2007

    Posted 07 Jul 2007 Link to this post

    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.
  5. Petya
    Admin
    Petya avatar
    869 posts

    Posted 07 Jul 2007 Link to this post

    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
  6. Raja
    Raja avatar
    21 posts
    Member since:
    Jul 2007

    Posted 07 Jul 2007 Link to this post

    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
  7. Petya
    Admin
    Petya avatar
    869 posts

    Posted 07 Jul 2007 Link to this post

    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
  8. Raja
    Raja avatar
    21 posts
    Member since:
    Jul 2007

    Posted 07 Jul 2007 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017