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

RadContextMenu Can you get an item to use a context menu client side

2 Answers 73 Views
Menu
This is a migrated thread and some comments may be shown as answers.
jeff
Top achievements
Rank 1
jeff asked on 27 Apr 2011, 09:18 PM
I am currently using the context menu like this. It works on all img tags existing at page load. However, If when i try to create an img client side it does not have the context menu. I know you can use show method on the click event however I want it on the left click. Is it possible, and if so how?
<telerik:RadContextMenu runat="server" ID="conTest" OnClientShowing="ClientShowing"
    OnClientItemClicked="ClientClicked">
    <Targets>
        <telerik:ContextMenuTagNameTarget TagName="img" />
    </Targets>
    <Items>
        <telerik:RadMenuItem Text="Edit">
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="Delete">
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="View Full">
        </telerik:RadMenuItem>
    </Items>
</telerik:RadContextMenu>

2 Answers, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 03 May 2011, 02:06 PM
Hello jeff,

Please try using the following code when adding a new image using javascript: contextMenu.addTargetElement(img);

Regards,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
jeff
Top achievements
Rank 1
answered on 03 May 2011, 02:32 PM
Thank you
Tags
Menu
Asked by
jeff
Top achievements
Rank 1
Answers by
Kate
Telerik team
jeff
Top achievements
Rank 1
Share this question
or