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

Persist state of PanelBar

2 Answers 157 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Marty
Top achievements
Rank 1
Marty asked on 18 Dec 2012, 06:46 PM
How do you persist state of panelbar items across postbacks?  I am using MVC4 and Razor... with panelbar in a master page _contentLayout f you will... Not sure how I can save the state of items and expanded state easily, don't see any config methods as there might have been in the past with telerik controls.
thanks
Marty

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Dec 2012, 04:57 PM
Hi Marty,

There is no viewstate in the MVC world, so HTML helpers, Kendo UI widgets and their server wrappers do not have built-in state persistence. If you require such a functionality, you need to implement it with custom code -

1. Use the PanelBar's client events to store information about the items' state in some hidden fields.
2. Submit the data to the server via a form or Ajax request.
3. Handle the submitted data in the controller and use it in the View to determine and set the PanelBar items' state.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Marty
Top achievements
Rank 1
answered on 20 Dec 2012, 05:28 PM
Thanks Dimo!  That's kinda what I thought but I was wondering if you carried over the persist  cookie from older style controls, using tempdata as cookie.  But thanks!  I think I can follow the examples using events!
Marty
Tags
PanelBar
Asked by
Marty
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Marty
Top achievements
Rank 1
Share this question
or