In this topic, you will learn how to use WebContextMenu as WebGrid's context menu.
To add WebContextMenu as WebGrid's context menu
WebContextMenu is part of WebDesktop so you need to have WebDesktop to implement this feature.- Open WebContextMenu's properties and set ControlId to your WebGrid's Id (eg:WebGrid1).
- In Properties box, click the Items Collection button. It will bring you to the WebMenuItem Collection Editor box
- Click Add to add WebMenuItem
-
- Add OnRowContextMenu in WebGrid client side event
JavaScript Copy Code function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject) {
return false; }