This is a migrated thread and some comments may be shown as answers.

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

4 Answers 635 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Pankratov
Top achievements
Rank 1
Pankratov asked on 27 Mar 2013, 12:45 PM
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 ???

4 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 28 Mar 2013, 02:10 PM
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.
0
Pankratov
Top achievements
Rank 1
answered on 28 Mar 2013, 02:19 PM
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...
0
Accepted
Vessy
Telerik team
answered on 28 Mar 2013, 06:45 PM
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.
0
Pankratov
Top achievements
Rank 1
answered on 29 Mar 2013, 10:25 AM
It works, thx
Tags
Splitter
Asked by
Pankratov
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Pankratov
Top achievements
Rank 1
Share this question
or