It looks like call to controller causes whole page to be reloaded.
About the tree I suggest you to have the tree working as you need withous using AJAX, and then you can turn to ajax. If you use the synchronous update the cookie will work too, so you will have your tree remember opened and closed nodes. For me it is difficult
to find a bug just by looking some code, so if you want you can send me a self contained project that show the problem that the Ajax call doesn0t work, and I will try to fix or ...verify that there is a bug in the javascript. You can send me a zip file using
the contact page of my blog here:
only root level is present. So it is not possible to select corresponding node. How to fix this
Sorr, I don't understand what is your problem. Why do you want select a node that is not a leaf? Do you mean that you are acting just on a branch of th tree on the server side(due to the async update) and you have no control on the remainder of the tree?
Consider also that I am completing the 0.9 release of the Mvc Controls Toolkit that will have a Server Control thta is a treeview with advances features thta might solve all your problems. The server control is based on the client side on the same tree
you are already using, so there will be no difference in the appearence of the tree. I should release this version next week...but maybe some beta tester might point out some "wrong feature" or some bug and maybe there will be a small delay.
About the horizontal menu...I don't know if it is better. It depends on your application! As you said horizontal menu is not persistent, so you if if it is better for your application to persist a "context" the tree is better. Suppose your purchaser has
chosen the category "shoes", and is browsing a specific product...it is better for him that "shoe"s remains seelecte, so you can easily pass to other type of shoes.
Anyway Horizontal menus can be implemented by using JUST CSS stylesheet...no code is needed. The key is using the :hover modifier that define the aspect of a DOM element on mouse hover. see forn instance the example here:http://www.webdesignerwall.com/tutorials/css3-dropdown-menu/.
As in the case of the tree you create a nested structure made of <ul> and <li> and the you apply the right css styles that makes chids appear and disappear adequately. To find more examples just type "CSS3 Dropdown menu" and similars in google.
francesco ab...
All-Star
20912 Points
3279 Posts
Re: Implementing three level product catalog in shopping cart
Mar 02, 2011 09:36 AM|LINK
It looks like call to controller causes whole page to be reloaded.
About the tree I suggest you to have the tree working as you need withous using AJAX, and then you can turn to ajax. If you use the synchronous update the cookie will work too, so you will have your tree remember opened and closed nodes. For me it is difficult to find a bug just by looking some code, so if you want you can send me a self contained project that show the problem that the Ajax call doesn0t work, and I will try to fix or ...verify that there is a bug in the javascript. You can send me a zip file using the contact page of my blog here:
http://www.dotnet-programming.com/contact.aspx
only root level is present. So it is not possible to select corresponding node. How to fix this
Sorr, I don't understand what is your problem. Why do you want select a node that is not a leaf? Do you mean that you are acting just on a branch of th tree on the server side(due to the async update) and you have no control on the remainder of the tree?
Consider also that I am completing the 0.9 release of the Mvc Controls Toolkit that will have a Server Control thta is a treeview with advances features thta might solve all your problems. The server control is based on the client side on the same tree you are already using, so there will be no difference in the appearence of the tree. I should release this version next week...but maybe some beta tester might point out some "wrong feature" or some bug and maybe there will be a small delay.
About the horizontal menu...I don't know if it is better. It depends on your application! As you said horizontal menu is not persistent, so you if if it is better for your application to persist a "context" the tree is better. Suppose your purchaser has chosen the category "shoes", and is browsing a specific product...it is better for him that "shoe"s remains seelecte, so you can easily pass to other type of shoes.
Anyway Horizontal menus can be implemented by using JUST CSS stylesheet...no code is needed. The key is using the :hover modifier that define the aspect of a DOM element on mouse hover. see forn instance the example here:http://www.webdesignerwall.com/tutorials/css3-dropdown-menu/. As in the case of the tree you create a nested structure made of <ul> and <li> and the you apply the right css styles that makes chids appear and disappear adequately. To find more examples just type "CSS3 Dropdown menu" and similars in google.
Mvc Controls Toolkit | Data Moving Plug-in Videos