Slidingpane save/load state

5 posts, 0 answers
  1. Roman Shkenjov
    Roman Shkenjov avatar
    4 posts
    Member since:
    Dec 2009

    Posted 11 Jan 2010 Link to this post

    Hello.

    How I can save/load the state on slidingpane (to remember the expanded/docked page). On forum I have founded this http://demos.telerik.com/aspnet-ajax/splitter/examples/saveloadstateonserver/defaultcs.aspx , but how I can save/load the state of RadSlidingZone/RadSlidingPane? Do you have any ideas?

    Regards,
    Roman
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 12 Jan 2010 Link to this post

    Hi Roman,

    Would you please provide more details about your exact scenario? If you want to preserve the state of a RadSlidingPane on postbacks, you do not need to write code, this scenario is handled by the splitter itself. You can test this e.g in the following demo:

    http://demos.telerik.com/aspnet-ajax/splitter/examples/sp_slidedirection/defaultcs.aspx

    Expand or dock a sliding pane in the demo and change the skin (this will cause a postback) and you will see that the sliding pane will preserve its expanded or docked state.

    In case your scenario is to save/load settings e.g for every separate user, you can use the standard approaches of preserving state in ASP.NET - e.g the same approach as shown in the demo you have linked, Session object, cookies, etc., depending on your exact scenario and requirements.


    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roman Shkenjov
    Roman Shkenjov avatar
    4 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2010 Link to this post

    Hi Svetlina.

    Thanks for  the answer. I have on master page 2 panes - left sliding pane (menu) and main pane (content). If I undock  pane and then select in menu another content, it ńot remains undocked pane and show docked pane (it is by default).

    <telerik:RadSplitter id="Radsplitter2" runat="server" height="100%" width="100%">
                    <telerik:RadPane id="Radpane1" runat="server" height="22" scrolling="none">
                        <telerik:RadSlidingZone id="Radslidingzone2" DockedPaneId="Radslidingpane4" runat="server" height="22">
                            <telerik:RadSlidingPane id="Radslidingpane4" title="Pane1" runat="server" height="150">Pane1</telerik:RadSlidingPane>
                           
                        </telerik:RadSlidingZone>
                    </telerik:RadPane>
                   
                    <telerik:RadPane id="Radpane2" runat="server">Main Pane</telerik:RadPane>
                  
     
                </telerik:RadSplitter>


    I need to save on master page dock and undock state to session.


    On previous  example showed saving state for radpane. http://demos.telerik.com/aspnet-ajax/splitter/examples/saveloadstateonserver/defaultcs.aspx .  But I not understand  how I can save  docked and undocked state for sliding pane. Can you please show  a working  example about this?


    Regards,
    Roman
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 13 Jan 2010 Link to this post

    Hello Roman,

    In your case you should use javacsript cookies (this will save you round trips to the server on every change of the state). What you should do is to save the state of the pane in the cookie and read it and adjust it accordingly.

    You can find a forum threda about this along with a sample demo attached below:

    http://www.telerik.com/community/forums/aspnet-ajax/splitter/client-state-persistence-across-pages.aspx

    A good article about js cookies is available below:

    http://www.quirksmode.org/js/cookies.html


    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Roman Shkenjov
    Roman Shkenjov avatar
    4 posts
    Member since:
    Dec 2009

    Posted 13 Jan 2010 Link to this post


    Hi Svetlina.

    Thanks for help. My problem is resolved.

    Regards,
    Roman
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017