This is a migrated thread and some comments may be shown as answers.
Treeview page navigation
6 Answers 72 Views
This is a migrated thread and some comments may be shown as answers.
Darryl
Top achievements
Rank 1
Darryl asked on 04 Dec 2012, 07:16 AM
Kendo docs is a nice looking site ... http://docs.kendoui.com/getting-started/changes-and-backward-compatibility

I thought now if I can just make my Kendo Web UI site work like this I'll get a pay rise for sure!

Seems though that each treenode selection triggers a postback and so the entire page is returned along with lots of ugly viewstate.

So now I'm thinking .... how can I use the Kendo UI treeview like this as a page navigator and have it's state persist across postbacks? Do I need to have my "content" page in a frame?

6 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 06 Dec 2012, 07:43 AM
Hello,

You could use a cookie to save the selected nodes and then set the nodes' expanded option to restore it through the configuration. Here is a small jsBin sample.

Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Darryl
Top achievements
Rank 1
answered on 06 Dec 2012, 10:54 PM
That's a neat trick.

Thanks.
0
Stephan
Top achievements
Rank 1
answered on 26 Feb 2013, 12:51 PM

Hello,

after the page containing the tree view is refreshed, the state isn’t remembered so the tree view is collapsed totally. We have the requirement that the state is unchanged on a refresh or navigation operation on the browser.

So our question: Is it possible to store the state in any way (cookies etc.) to restore it on a page load?

Thanks in advance.

0
Daniel
Telerik team
answered on 28 Feb 2013, 08:51 AM
Hello Stephan,

I posted a sample project using Kendo MVC in the other forum thread on the same topic. If you need a solution with Kendo UI Web, I can suggest to check the jsBin example from my previous reply in this thread.

Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nathan
Top achievements
Rank 1
answered on 24 Mar 2014, 07:46 PM
I was looking at that jsBin sample.  Is there something similar for someone using mvc 5 / razor?

thanks
0
Daniel
Telerik team
answered on 26 Mar 2014, 03:05 PM
Hello,

A sample using MVC is available in the forum thread linked in my previous post. 

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Asked by
Darryl
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Darryl
Top achievements
Rank 1
Stephan
Top achievements
Rank 1
Nathan
Top achievements
Rank 1
Share this question
or