Jan 11, 2013, 7:32 AM
Treeview with dynamic (context sensitive) context menu items supporting DirectEvents
Hi all,
I am very new to Ext.Net (MVC) so this may be something I have just not found in the help/forums or I may be taking the wrong approach all together.
I am building an app based on a plugin model (small subsets of functionality are provided by plugged in modules to the application as whole). The approach I have taken so far is to allow each module to add nodes (lazy loaded) to the treeview based on its context within the tree. However my next task has been to create a context sensitive context menu when a user right clicks on a node of the tree. We have this working at the moment as long as all of the menus are pre-generated in the home view, however what I want to do it dynamically build the menu by making a call back to the server (in the similar way to the method to populate the child tree nodes) to ascertain what the nodes should be.
[Edit]
I should have mentioned that I also would like to be able to specify DirectEvents on each context menu item node.
Does anyone have any thoughts on the best approach to achieve this and some code examples would be most appreciated if you have them?
Thanks
Ian
I am very new to Ext.Net (MVC) so this may be something I have just not found in the help/forums or I may be taking the wrong approach all together.
I am building an app based on a plugin model (small subsets of functionality are provided by plugged in modules to the application as whole). The approach I have taken so far is to allow each module to add nodes (lazy loaded) to the treeview based on its context within the tree. However my next task has been to create a context sensitive context menu when a user right clicks on a node of the tree. We have this working at the moment as long as all of the menus are pre-generated in the home view, however what I want to do it dynamically build the menu by making a call back to the server (in the similar way to the method to populate the child tree nodes) to ascertain what the nodes should be.
[Edit]
I should have mentioned that I also would like to be able to specify DirectEvents on each context menu item node.
Does anyone have any thoughts on the best approach to achieve this and some code examples would be most appreciated if you have them?
Thanks
Ian
Last edited by lake; Jan 11, 2013 at 7:39 AM.