IsContext and ContextMenuElementID

4 posts, 0 answers
  1. MB
    MB avatar
    149 posts
    Member since:
    Jan 2005

    Posted 14 Jan 2008 Link to this post

    Moving an application from Classic Menu to Prometheus Menu, and I have a context menu that is created programatically.

    I can't find the equivilent of Menu.IsContext and Menu.ContextMenuElementID even though these members are settable via declaritive creation ??
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 15 Jan 2008 Link to this post

    Hello,

    Those properties have been removed in favor of new control - RadContextMenu. It has a targets collection where you specify which elements should that context menu apply to. In a word here is the equivalent of the ContextMenuElementID property:

    <telerik:RadContextMenu runat="server">
        <Targets>
            <telerik:ContextMenuElementTarget ElementID="someElementID" />
        </Targets>
    </
    telerik:RadContextMenu>
    You can check out our context menu online examples:
    http://www.telerik.com/demos/aspnet/prometheus/Menu/Examples/ContextMenu/CopyPaste/DefaultCS.aspx

    Unfortunately our context menu documentation is still outdated. We will do our best to update it for the service pack.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Keith LeBeau
    Keith LeBeau avatar
    51 posts
    Member since:
    Feb 2005

    Posted 17 Jan 2008 Link to this post

    How do you access this from code? There doesn't seem to be a .Targets collection nor .ContextMenuControlTarget property for RadContextMenu. We're migrating to Prometheus and when adding a context menu to a grid through code we used to just have to do:

    ctlGloContextMenu.ContextMenuElementID = ctlGloGrid.ClientID

    How do we do this now? We don't use code directly in our ASPX pages, only through a compiled DLL.
  4. Keith LeBeau
    Keith LeBeau avatar
    51 posts
    Member since:
    Feb 2005

    Posted 17 Jan 2008 Link to this post

    Actually, I figured it out. We were using a RadMenu as the context menu. Changing the inherited type to RadContextMenu did the job.
Back to Top