Dynamic Context Menu i Grid using WebService Call

2 posts, 0 answers
  1. Randy
    Randy avatar
    73 posts
    Member since:
    Oct 2007

    Posted 04 Aug 2008 Link to this post

    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
  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 05 Aug 2008 Link to this post

    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.
Back to Top