Radsplitter Collapsing Serverside

2 posts, 0 answers
  1. Vijaianand
    Vijaianand avatar
    82 posts
    Member since:
    Jul 2012

    Posted 13 Oct 2011 Link to this post

    I like to get the RadPane on the RadSplitter collapsed from codebehind preferably after post back. I saw few options using javascript but I want to do it on the codebehind so I can do it after every post back. Or I want the radpane to show collapsed after every page postback even with ExpandPanelId set. 

    Please gimme some solution.

    Vijai
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 19 Oct 2011 Link to this post

    Hi Vijai,

    I have already answered your support ticket on the subject. For convenience I will paste my answer here as well:

    If I understand you correctly you need to have the sliding pane expanded only on initial load and collapsed on subsequent postbacks. To achieve this, you need to manually clear the ExpandedPaneId property of the parent sliding zone, e.g.:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            RadSlidingZone1.ExpandedPaneId = "RadSlidingPane1";
        else
            RadSlidingZone1.ExpandedPaneId = "";
    }

    You need to manually clear the ExpandedPaneId because by design RadSplitter preserves the its state over postbacks.


    Best wishes,
    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
Back to Top