This is a migrated thread and some comments may be shown as answers.

Dynamic Context Menu i Grid using WebService Call

1 Answer 75 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 04 Aug 2008, 01:58 PM
I'm trying to create a dynamic context menu in my grid.  Each row would have its own set of options that I want to load using the WebServices support of the RadContextMenu control.   What I have noticed that I cannot seem to have the context menu load items unless I add at least one MenuItem and set the ExpandMode to "WebService".   This causes the popup menu to have submenu rather than just load the RadMenuItems at the root.  I expected that if I set the WebService settings of the RadContextMenu without having any RadMenuItems statically created, it would load the menu items at the root.  This did not work as I expected. 

Am I missing something?   What is the recommended approach where I have a grid that contains rows.  Each row may have its own distinct set of popup options that I wish to display.

Thanks, Randy

1 Answer, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 05 Aug 2008, 08:24 AM
Hi Randy,

RadContextMenu cannot populate its root items from a webservice. There is a possible approache though, which is actually the best in terms of performance:

Have a single RadContextMenu, which will contain all the possible items. When showing the context menu, manipulate the visibility of the items.

Let me know if that helps.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Menu
Asked by
Randy
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Share this question
or