Close RadDock after new seconds

2 posts, 0 answers
  1. Bader
    Bader avatar
    215 posts
    Member since:
    Aug 2008

    Posted 03 Oct 2010 Link to this post


    I'm wonder if I can hide (close) the raddock after 5 second (for example) of displaying it. In other words, the code must count 5 seconds and then close the raddock (The raddock is displayed immediately after opening the page).

    Please, if it is possible, send me the required code,

  2. Pero
    Pero avatar
    1156 posts

    Posted 06 Oct 2010 Link to this post

    Hello Bader,

    The easiest way to achieve this is to use the setTimeout method, when the dock is loaded. Here is an example:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <form id="form1" runat="server">
        <asp:ScriptManager ID="RadScriptManager1" runat="server">
        <script type="text/javascript">
            //Put your JavaScript code here.
            function OnClientInitialize(dock, args)
                setTimeout(function ()
                }, 5000);
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
                <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                    <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px"
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top