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

Hide SplitBar

2 Answers 100 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Jasper
Top achievements
Rank 1
Jasper asked on 15 Mar 2011, 12:13 PM
Hi,

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

Best regards
 

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 16 Mar 2011, 04:21 PM
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!
0
Jasper
Top achievements
Rank 1
answered on 16 Mar 2011, 11:32 PM
Thank you, Marin.

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

Best Regards
Tags
Splitter
Asked by
Jasper
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Jasper
Top achievements
Rank 1
Share this question
or