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

Slidingpane save/load state

4 Answers 89 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Roman Shkenjov
Top achievements
Rank 1
Roman Shkenjov asked on 11 Jan 2010, 06:34 PM
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

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 12 Jan 2010, 02:47 PM
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.
0
Roman Shkenjov
Top achievements
Rank 1
answered on 12 Jan 2010, 06:26 PM
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
0
Svetlina Anati
Telerik team
answered on 13 Jan 2010, 09:35 AM
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.
0
Roman Shkenjov
Top achievements
Rank 1
answered on 13 Jan 2010, 10:03 AM

Hi Svetlina.

Thanks for help. My problem is resolved.

Regards,
Roman
Tags
Splitter
Asked by
Roman Shkenjov
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Roman Shkenjov
Top achievements
Rank 1
Share this question
or