Your search did not match any results.
ContextMenu

Basics

Documentation
The ContextMenu widget displays a single- or multi-level context menu. An end user invokes this menu by a right click or a long press. This demo illustrates how to create a simple ContextMenu.
<div class="label"> Right click the image to show available actions: </div> <img id="image" src="~/Content/Images/ProductsLarge/7.png" /> @(Html.DevExtreme().ContextMenu() .Width(200) .Target("#image") .OnItemClick("contextMenu_ItemClick") .DisplayExpr("Text") .ItemsExpr("Items") .DataSource(new object[] { new { Text = "Share", Items = new[] { new { Text = "Facebook" }, new { Text = "Twitter" } } }, new { Text = "Download" }, new { Text = "Comment" }, new { Text = "Favorite" } }) ) <script> function contextMenu_ItemClick(e) { if(!e.itemData.Items) { DevExpress.ui.notify("The \"" + e.itemData.Text + "\" item was clicked", "success", 1500); } } </script>
using System; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class ContextMenuController : Controller { public ActionResult Basics() { return View(); } } }
#image { height: 300px; } .label { color: #767676; }