Change splitter orientation in client side

5 posts, 0 answers
  1. MTs
    MTs avatar
    7 posts
    Member since:
    Dec 2010

    Posted 16 Jan 2012 Link to this post

    Can I change splitter orientation in client side?

    Thanks,
    MTs
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 17 Jan 2012 Link to this post

    Hi MTs,

    No, it is not possible to change the splitter's orientation on the client. The problem comes from the fact that RadSplitter renders differently depending on the value of its Orientation property.

    Nevertheless, you can apply this modification by triggering an AJAX call and set the value of the splitter on the server.

    Regards,
    Dobromir
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. MTs
    MTs avatar
    7 posts
    Member since:
    Dec 2010

    Posted 17 Jan 2012 Link to this post

    The problem with server side is that I must update the whole splitter's update panel, including it's two panes.
    It's heavy because one of the panes contains records from a very complicated query on the database.

    Thanks anyway
    MTs.
  5. Dave
    Dave avatar
    19 posts
    Member since:
    Nov 2010

    Posted 06 Feb 2013 Link to this post

    Not sure if this reply will be seen so late but; I am changing the orientation server side when user selects but it never seems to do anything?  Is there a repaint or refresh or .. ?
  6. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 11 Feb 2013 Link to this post

    Hi Dave,

    When you are changing the Splitter's orientation, you will also need to reset the width and height of it and its children (RadPanes). For example:

    ASPX:
    <asp:Button ID="Button1" runat="server" Text="Change Orientation" OnClick="Button1_Click" />
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="700px" Height="700px" Orientation="Horizontal">
        <telerik:RadPane ID="RadPane1" runat="server"></telerik:RadPane>
        <telerik:RadPane ID="RadPane2" runat="server"></telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server"></telerik:RadPane>
    </telerik:RadSplitter>

    CS:
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (RadSplitter1.Orientation == System.Web.UI.WebControls.Orientation.Horizontal)
        {
            RadSplitter1.Orientation = System.Web.UI.WebControls.Orientation.Vertical;
        }
        else
        {
            RadSplitter1.Orientation = System.Web.UI.WebControls.Orientation.Horizontal;
        }
        RadSplitter1.Width = Unit.Pixel(700);
        RadSplitter1.Height = Unit.Pixel(700);
        RadPane1.Width = RadPane2.Width = RadPane3.Width = Unit.Empty;
        RadPane1.Height = RadPane2.Height = RadPane3.Height = Unit.Empty;
    }

    I hope this is helpful for you.

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