We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Context Menu Client Side Code

Thread ID:





79064 Jan 19,2009 03:48 PM UTC Jan 20,2009 12:13 PM UTC ASP.NET Web Forms (Classic) 1
Tags: Tools
Stephen Girolami
Asked On January 19, 2009 03:48 PM UTC

I'm trying to get the following javascript code to work:

var menu = $get( "m_menuVersionsContext" );
if( menu != null )
menu.ShowContextMenu(null,null,event,sData );

At runtime the actual name of the menu control is ct100_ContentPlaceHolder1_ct102_ct105_m_menuVersionsContext. How am I supposed to get hold of the context menu control when its name is so dynamic?


Rekha P [Syncfusion]
Replied On January 20, 2009 12:13 PM UTC

Hi Steve,

Thank you for your interest in Syncfusion Products.

In order to show the context menu, Menu control's ClientObjectId is used to access the ShowContextMenu method.
Please refer the code snippet below to achieve this.


function showcontextmenu(odata)
var bShowMenu = false; var oEvent = odata.Event;

MenuClientObjectId.ShowContextMenu( null, null, oEvent, odata ); //MenuClientObjectId is the ClientObjectId of Menu control

return bShowMenu;

Also please refer the sample below which illustrates the above.

http://websamples.sy ncfusion.com/samples/Tools.Web/

Please let me know if you have any concerns.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon