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

[Solved] IsContext and ContextMenuElementID

3 Answers 215 Views
Menu
This is a migrated thread and some comments may be shown as answers.
MB
Top achievements
Rank 1
MB asked on 14 Jan 2008, 11:50 PM
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 ??

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Jan 2008, 08:59 AM
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
0
QScend
Top achievements
Rank 1
answered on 17 Jan 2008, 05:31 PM
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.
0
QScend
Top achievements
Rank 1
answered on 17 Jan 2008, 09:21 PM
Actually, I figured it out. We were using a RadMenu as the context menu. Changing the inherited type to RadContextMenu did the job.
Tags
Menu
Asked by
MB
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
QScend
Top achievements
Rank 1
Share this question
or