Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Docking > RadDock hides automatically
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Answered RadDock hides automatically

Feed from this thread
  • Sanjay avatar

    Posted on Jan 7, 2010 (permalink)

    Hello,

    I have a raddock with a load-on-demand radcombobox inside a aspx page. The raddock is made visible only after clicking a button on the aspx page.

    There is a load-on-demand radcombobox inside the raddoc which has a autopostback property set to true as I need to update a content of a label also inside the raddoc.

    Now as soon as I select a record from the load-on-demand radcombobox the raddock hides.

    I have a save and cancel button in the raddock.
    The cancel button has a client side function to close and it works fine.

    1) I need the code to keep the raddock visible after the dropdown postback occurs.

    2) I also need the code to close raddock from the aspx.vb (not client side) after I save the record.

    I have spend a lot of time but can't succeed!
    Please help.
     

  • Answer Petio Petkov Petio Petkov admin's avatar

    Posted on Jan 8, 2010 (permalink)

    Hello Sanjay,

    If you want to show/hide a RadDock, you should use the Closed property. In case that you want to show/hide it on the client you should use dock.set_closed(true/false) method. I tested the code below(which is similar to described goal) and everything works as expected:

    <head id="Head1" runat="server">
        <title></title>
      
        <script type="text/javascript">
            function ShowDock(dockId, willHide) {
                var dock = $find(dockId);
                dock.set_closed(willHide);
            }
        </script>
      
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <input type="button" onclick="ShowDock('RadDock1',true)" value="Hide" />
            <input type="button" onclick="ShowDock('RadDock1',false)" value="Show" />
            <asp:Button ID="btnShowDock" runat="server"
            Text="ShowDockOnServer" />
            <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
                <telerik:RadDock runat="server" ID="RadDock1" Closed="true" Top="200px" Left="100px">
                    <ContentTemplate>
                        <telerik:RadComboBox ID="Combo1" runat="server" AutoPostBack="true">
                            <Items>
                                <telerik:RadComboBoxItem Text="Item1" />
                                <telerik:RadComboBoxItem Text="Item2" />
                            </Items>
                        </telerik:RadComboBox>
                    </ContentTemplate>
                </telerik:RadDock>
                <asp:Button ID="btnPostback" runat="server" Text="Postback" />
            </telerik:RadDockLayout>
        </div>
        </form>
    </body>
    </html>
    Codebehind:
    Protected Sub btnShowDock_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShowDock.Click
          RadDock1.Closed = False
      End Sub

    In case the issue perisists on your side, please share reproduction code which is fully runnable and we will do our best to help.

    Greetings,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  • Sanjay avatar

    Posted on Jan 8, 2010 (permalink)

    Hi Petio ,

    Thanks very much for your help!

    Sanjay

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Docking > RadDock hides automatically