How to disable splitter resize then all sliding panes are coalapsed?

5 posts, 1 answers
  1. Pankratov
    Pankratov avatar
    3 posts
    Member since:
    May 2011

    Posted 27 Mar 2013 Link to this post

    How to modify this sample http://demos.telerik.com/aspnet-ajax/splitter/examples/sp_enableresizedock/defaultcs.aspx to disable resizing then no sliding panes are docked/expanded ???
  2. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 28 Mar 2013 Link to this post

    Hi Aleksandr,

    There are two possible way to achieve the disable the resizing of the Pane, holding the SlidingZone.
    1. You could remove the Splitbar, so the resizing won't be possible at all:
      <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="400" Width="700">
          <telerik:RadPane ID="LeftPane" runat="server" Width="22" Scrolling="None">
              <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22">
                  ...
              </telerik:RadSlidingZone>
          </telerik:RadPane>
          <telerik:RadPane ID="MiddlePane" runat="server">
              Main Pane</telerik:RadPane>
      </telerik:RadSplitter>
    2. You could configure the MinWidth Property of the SlidingZone's parent Pane (the LeftPane), so it could not be resized:
      <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="400" Width="700">
          <telerik:RadPane ID="LeftPane" runat="server" Width="22" Scrolling="None" MaxWidth="22">
              <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22">
                  ...
              </telerik:RadSlidingZone>
          </telerik:RadPane>
          <telerik:RadSplitBar ID="RadSplitbar1" runat="server">
          </telerik:RadSplitBar>
          <telerik:RadPane ID="MiddlePane" runat="server">
              Main Pane</telerik:RadPane>
      </telerik:RadSplitter>

    I hope this information would be helpful for you.

    All the best,
    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
  4. Pankratov
    Pankratov avatar
    3 posts
    Member since:
    May 2011

    Posted 28 Mar 2013 Link to this post

    Vesi
    I don't need to disable resizing at all, only then all panes are coalapsed, if some of them docked or expanded resize must work...
  5. Answer
    Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 28 Mar 2013 Link to this post

    Hi Aleksandr,

    Thank you for the clarification.

    In such case you will need to attach handlers to the SplidingPanes' OnClientDocked and OnClientUndocked events, where to reset the MaxWidth value of there parent RadPane. For instance, it could be achieved in a similar way:
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="400" Width="550">
        <telerik:RadPane ID="LeftPane" runat="server" Width="22" Scrolling="None" MaxWidth="22">
            <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22">
                <telerik:RadSlidingPane ID="Pane1" Title="Pane1" runat="server" Width="150" OnClientDocked="OnClientDocked" OnClientUndocked="OnClientUndocked">
                    ...
                </telerik:RadSlidingPane>
                <telerik:RadSlidingPane ID="Pane2" Title="Pane2" runat="server" Width="150" OnClientDocked="OnClientDocked" OnClientUndocked="OnClientUndocked">
                    ...
                </telerik:RadSlidingPane>
            </telerik:RadSlidingZone>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitbar1" runat="server">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="MiddlePane" runat="server">
            Main Pane</telerik:RadPane>
    </telerik:RadSplitter>
    <script type="text/javascript">
        function OnClientDocked(sender, args) {
            var splitter = $find("RadSplitter1");
            var parentPane = $find("LeftPane");
            parentPane.set_maxWidth(parseInt(splitter.get_width()));
        }
     
        function OnClientUndocked(sender, args) {
            var parentPane = $find("LeftPane");
            parentPane.set_maxWidth(22);
        }
    </script>

    Please, give it a try and let me know if I could be any further assistance.

    Kind 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.
  6. Pankratov
    Pankratov avatar
    3 posts
    Member since:
    May 2011

    Posted 29 Mar 2013 Link to this post

    It works, thx
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017