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

Auto Re-size?

1 Answer 79 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Jezz Dalgarno
Top achievements
Rank 1
Jezz Dalgarno asked on 01 Sep 2009, 02:41 PM
Hi,

I have a page with a single vertical splitter separating two RadPane's. The left hand pane has these settings:

<telerik:RadPane ID="LeftPane" runat="server" Width="250"

The Splitter has these settings:

<telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> 

The right Pane has these settings:

 <telerik:RadPane ID="ContentPane" runat="server" > 

At the moment, the left pane houses a TreeView menu, sometimes the width of the menu exceeds the default 250px width setting of the pane, causing a horizontal scrollbar to appear, as can be seen in the following screenshot:

View Splitter Screenshot

What i'd prefer would be is if the splitter could increase in width to accommodate the full width of the treeview, an auto re-size if you will. I have tried removing the left RadPanes width setting, but this results in the starting width being 50% of the screen, which is far to wide.

Does anyone know if this is possible, either as an available setting or through CSS?

Thanx in advance.

1 Answer, 1 is accepted

Sort by
0
Mr. Plinko
Top achievements
Rank 1
answered on 01 Sep 2009, 05:30 PM
Try this link on resizing radsplitter to content. You can easily customize it to do the widths instead.

For example, you could do something like:

 <script type="text/javascript">   
    function SplitterLoaded(splitter, arg)   
    {   
        var pane = splitter.getPaneById('<%= RadPane2.ClientID %>');   
        var width = pane.getContentElement().scrollWidth;   
        splitter.set_width(width);   
        pane.set_width(width);   
    }   
</script>  

Helpful?
Tags
Splitter
Asked by
Jezz Dalgarno
Top achievements
Rank 1
Answers by
Mr. Plinko
Top achievements
Rank 1
Share this question
or