Hide SplitBar

3 posts, 1 answers
  1. Jasper
    Jasper avatar
    31 posts
    Member since:
    Apr 2009

    Posted 15 Mar 2011 Link to this post

    Hi,

    is it possible to hide a splitbar if one of the panes next to the splitbar is collapsed?

    Best regards
     
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 16 Mar 2011 Link to this post

    Hello Jasper,

    You could hide it by using the example code below:
    <telerik:RadSplitter ID="splitter1" runat="server" Orientation="Vertical">
        <telerik:RadPane runat="server" ID="leftPane" OnClientCollapsed="hideSplitBar">left pane</telerik:RadPane>
        <telerik:RadSplitBar runat="server" id="splitbar1" Width="5px" CollapseMode="Both"></telerik:RadSplitBar>
        <telerik:RadPane runat="server" ID="middlePane" OnClientCollapsed="hideSplitBar">middle pane</telerik:RadPane>
        <telerik:RadPane runat="server" ID="rightPane">right pane</telerik:RadPane>
    </telerik:RadSplitter>

    and
    <script type="text/javascript">
     
        function hideSplitBar() {
            var splitbarWrapper = $get("<%=splitbar1.ClientID %>");
            splitbarWrapper.style.display = "none";
        }
    </script>

    Please note that hiding the SplitBar would remove the user's interface for opening the pane again, so you would have to do it programmatically or remove the "display: none" property.


    All the best,
    Marin
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jasper
    Jasper avatar
    31 posts
    Member since:
    Apr 2009

    Posted 16 Mar 2011 Link to this post

    Thank you, Marin.

    I needed to resize the other non-collapsed pane using setVarSize but know it works like a charm. :)

    Best Regards
Back to Top