5 Answers, 1 is accepted
0
Hi relper,
RadTreeViewContextMenu is a separate control used by RadTreeView. RadTreeView does not support client-side creation of context menus.
For client-side modification of the RadTreeViewContextMenu you can create an empty one and add it to the RadTreeView on the server. You can then populate its nodes dynamically on the client as needed.
I hope this helps.
Kind regards,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
RadTreeViewContextMenu is a separate control used by RadTreeView. RadTreeView does not support client-side creation of context menus.
For client-side modification of the RadTreeViewContextMenu you can create an empty one and add it to the RadTreeView on the server. You can then populate its nodes dynamically on the client as needed.
I hope this helps.
Kind regards,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
relper
Top achievements
Rank 1
answered on 29 Feb 2008, 03:48 PM
Thanks Erjan.
But I’m having problems to find the right functions on the client. What I did was to define the empty context menus (5 total) on the tree, in the aspx page. Then on the client I’m trying to get the context menu object and add the items using LoadXml. The actual xml comes from a web service call. Coul you please provide some sample code that does something like that? Thanks!
0
Hi relper,
RadTreeView doesn't have webservice context menu item population out of the box. This could be a nice feature though, so we will give it a try in the future. Currently this can be implemented by the aid of some javascript code.
Please, find attached an example I just created. The demo creates a webservice loader in the RadTreeView's ContextMenuShowing client event and loads the root items. The children are loaded in the standard RadMenu way - by using the WebServiceSettings property of the RadTreeViewContextMenu.
I hope this helps.
Kind regards,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
RadTreeView doesn't have webservice context menu item population out of the box. This could be a nice feature though, so we will give it a try in the future. Currently this can be implemented by the aid of some javascript code.
Please, find attached an example I just created. The demo creates a webservice loader in the RadTreeView's ContextMenuShowing client event and loads the root items. The children are loaded in the standard RadMenu way - by using the WebServiceSettings property of the RadTreeViewContextMenu.
I hope this helps.
Kind regards,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Accepted
Hi again relper,
I forgot mentioning, that the workaround uses a private client-side method of the RadContextMenu - _loadFromDictionary(itemData), which assigns menu property values from the itemData parameter.
Cheers,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I forgot mentioning, that the workaround uses a private client-side method of the RadContextMenu - _loadFromDictionary(itemData), which assigns menu property values from the itemData parameter.
Cheers,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
relper
Top achievements
Rank 1
answered on 04 Mar 2008, 03:49 PM
Thanks Erjan! This will do. I'll still have to "translate" the XML format I have my menus to the RadMenuItemData on the web service but I don't hink it will be a problem. Thanks again.