This question is locked. New answers and comments are not allowed.
Hello all,
I am just starting out using the TreeView to load menu items for the backend CMS so that they can be maintained. In the process, of course the menu items will need to cascade into nodes and nested nodes. I will need JavaScript, JQuery to obtain the selected node when the "Apply" button or "Submit" button is clicked in the View. Also the abilty to insert a node and name it.
What makes this a bit complicated is that conceptually it seems as though the right tactic would be to use the right view model that contained the other properties needed to pin to each Node (ModelMenuItem in the model) or menu item. That schema in the database and on the object contain a ControllerName and Controller action that works fine right now in loading the Telerik Menu with the MenuIndexModel class (found in a demo here). So I need to associate and record the properties the user fills in in a <div> for the menu object so that as they traverse the tree and do their work I can provide an "Apply" button as they go and then just wait until the save button is clicked to commit. At that thime I think flushing and recreating the MenuItem table in the database would be prudent.
Any examples of traversing the tree in Jquery and rebuilding a Hierarchy of menu items (Site Map whatever it may be) would be greatly appreciated.
I know there are examples of using the site map for the menu source which is fine, but nt the direction I took for other reasons.
I also want to allow that view eventually to contain a RadEditor so that the users can edit the MegaMenu content if desired.
Does anyone have any conceptual points or example code to help expedite this part of the solution? Even if my approach is not right to begin with.
Much appreciated, Thanks!
Reid
I am just starting out using the TreeView to load menu items for the backend CMS so that they can be maintained. In the process, of course the menu items will need to cascade into nodes and nested nodes. I will need JavaScript, JQuery to obtain the selected node when the "Apply" button or "Submit" button is clicked in the View. Also the abilty to insert a node and name it.
What makes this a bit complicated is that conceptually it seems as though the right tactic would be to use the right view model that contained the other properties needed to pin to each Node (ModelMenuItem in the model) or menu item. That schema in the database and on the object contain a ControllerName and Controller action that works fine right now in loading the Telerik Menu with the MenuIndexModel class (found in a demo here). So I need to associate and record the properties the user fills in in a <div> for the menu object so that as they traverse the tree and do their work I can provide an "Apply" button as they go and then just wait until the save button is clicked to commit. At that thime I think flushing and recreating the MenuItem table in the database would be prudent.
Any examples of traversing the tree in Jquery and rebuilding a Hierarchy of menu items (Site Map whatever it may be) would be greatly appreciated.
I know there are examples of using the site map for the menu source which is fine, but nt the direction I took for other reasons.
I also want to allow that view eventually to contain a RadEditor so that the users can edit the MegaMenu content if desired.
Does anyone have any conceptual points or example code to help expedite this part of the solution? Even if my approach is not right to begin with.
Much appreciated, Thanks!
Reid