Undock a sliding pane without having it collapse

2 posts, 0 answers
  1. Sylvain
    Sylvain avatar
    1 posts
    Member since:
    Aug 2012

    Posted 02 Sep 2010 Link to this post

    Is there a way to prevent a sliding pane from collapsing when it's undocked? I'd like to be able to undock an expanded sliding pane and have it stay where it's at, however I can't find an easy way to achieve that. Any suggestions?
    Thanks!
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 08 Sep 2010 Link to this post

    Hi Sylvain,

    I already answered your support ticket on the subject. For convenience I will paste my answer here as well:

    By design, when a sliding pane is docked it is collapsed. In order to expand it when undocking you need to attach handler to the OnClientBeforeUndock client-side event of the sliding pane and expand it using the sliding zone's expandPane() method, e.g.:
    <telerik:radsplitter ID="RadSplitter1" runat="server">
        <telerik:RadPane ID="RadPane1" runat="server">
            <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" ClickToOpen="true" SlideDuration="0">
                <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" OnClientBeforeUndock="OnClientBeforeUndock"></telerik:RadSlidingPane>
            </telerik:RadSlidingZone>
        </telerik:RadPane>
    </telerik:radsplitter>
     
    <script type="text/javascript">
        function OnClientBeforeUndock(sender, args)
        {
            var slidingZone = $find("<%=RadSlidingZone1.ClientID%>");//get reference to the sliding zone
             
            setTimeout(function ()//set timeout to ensure that the calcualtions are finished
            {
                slidingZone.expandPane(sender.get_id());//expand undocking pane
            }, 0);
        }
    </script>

    Please let us know if this helps.


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