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 doesn''t work for itemtemplate column

Thread ID:





81097 May 12,2009 12:40 PM UTC May 14,2009 01:58 PM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Administrator [Syncfusion]
Asked On May 12, 2009 12:40 PM UTC

If the column type is Item template then the context menu doesn't show up :(

Rekha P [Syncfusion]
Replied On May 14, 2009 01:58 PM UTC

Hi Girish,

Thank you for your interest in Syncfusion Products.

We regret to let you know that currently it is not possible to show the context menu over the Item Templates. But as a workaround, please refer the sample below which illustrates of displaying Menu control as popup while hovering on image item template.


Steps followed are:
1. Place Image and PopupControlContainer inside ItemTemplate.
2. Place Menu control inside PopupControlContainer.
3. For every row bounding, set corresponding MenuItem text, PopupControlContainer clientobjectid and attribute for image mouse over event.
4. Capture the popup clientobjectid using js function by evaluating it.

Please refer the code snippet below to achieve this.



void GridGroupingControl1_RowDataBound(object sender, RowDataBoundEventArgs e)
if (e.Element.Kind == Syncfusion.Grouping.DisplayElementKind.Record)
for (int i = 0; i < e.Row.Cells.Count; i++)
if (((GridCell)(e.Row.Cells[i])).ColumnDescriptor != null)
//check ItemTemplate column name
if (((GridCell)(e.Row.Cells[i])).ColumnDescriptor.Name == "Image")
Syncfusion.Web.UI.WebControls.Tools.Menu ContextMenu = (Syncfusion.Web.UI.WebControls.Tools.Menu)e.Row.Cells[i].FindControl("Menu1");
if (ContextMenu != null)
//bind text to MenuItem
ContextMenu.Items[0].Text = e.Row.Record.GetValue("Name").ToString();
Syncfusion.Web.UI.WebControls.Shared.PopupControlContainer PopUp = (Syncfusion.Web.UI.WebControls.Shared.PopupControlContainer)e.Row.Cells[i].FindControl("PopupControlContainer1");
if (PopUp != null)
//specify ClientObjectId of PopupControlContainer
PopUp.ClientObjectId = e.Row.Record.GetValue("Name").ToString();
System.Web.UI.WebControls.Image ContextMenuImage = (System.Web.UI.WebControls.Image)e.Row.Cells[i].FindControl("ContextMenuImage");
if (ContextMenuImage != null)
ContextMenuImage.Attributes.Add("onmouseover", "Showpopup('"+PopUp.ClientObjectId+"')");


We can trigger the PopupControlContainer's ClientObjectId by evaluating the expression.

If you want to display the popup with corresponding hovered Image's, please use the below code.

For more information about PopupControlContainer, refer to ASP.Net --> Controls and Components --> Notification Package --> PopupControlContainer


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