RadSlidingPane hide() show()

2 posts, 1 answers
  1. Lubomir
    Lubomir  avatar
    15 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2012 Link to this post

    how can I show() radsliding pane with property Visible="false"  client side (with javascript), and how to set visible="true" after clicking some button.
  2. Answer
    Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 12 Nov 2012 Link to this post

    Hi Lubo,

    When the Visible property of a SlidingPane is set to "false",  the SlidingPane's client object is not created at all, so there is no way to modify its visibility Client-side. If you need to show/hide a specific SlidingPane on a button click, you could achieve it by using the SlidingPane's showTab() and hideTab() methods:
    <telerik:RadSplitter ID="RadSplitter1" runat="server" OnClientLoad="HideSlidingPane">
        <telerik:RadPane ID="RadPane1" runat="server" Width="22px">
            <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" Width="22px">
                <telerik:RadSlidingPane ID="RadSlidingPane1" Title="RadSlidingPane1" runat="server" Width="200px">
                </telerik:RadSlidingPane>
                <telerik:RadSlidingPane ID="RadSlidingPane2" Title="RadSlidingPane1" runat="server" Width="200px">
                </telerik:RadSlidingPane>
            </telerik:RadSlidingZone>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBarTree" runat="server" />
        <telerik:RadPane ID="RadPane2" runat="server">
            <asp:Button ID="Button1" runat="server" Text="Show SlidingPane2" OnClientClick="ShowSlidingPane(); return false;" />
            <asp:Button ID="Button2" runat="server" Text="Hide SlidingPane2" OnClientClick="HideSlidingPane(); return false;" />
        </telerik:RadPane>
    </telerik:RadSplitter>
    <script type="text/javascript">
        function HideSlidingPane() {
            var slidingPane = $find("RadSlidingPane2");
            slidingPane.hideTab();
        }
        function ShowSlidingPane() {
            var slidingPane = $find("RadSlidingPane2");
            slidingPane.showTab();
        }
    </script>

    Regards,
    Vesi
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top