Auto Re-size?

2 posts, 0 answers
  1. Jezz Dalgarno
    Jezz Dalgarno avatar
    3 posts
    Member since:
    Aug 2009

    Posted 01 Sep 2009 Link to this post

    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.
  2. Mr. Plinko
    Mr. Plinko avatar
    56 posts
    Member since:
    Jul 2009

    Posted 01 Sep 2009 Link to this post

    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?
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top