Blazor Grid - Display a Context Menu

April 27, 2026 ยท View on GitHub

You can display a Context Menu when you right-click any Blazor Grid element. In this example, a click on a column header or row invokes the Context Menu.

Grid with Context Menu for a column

Add the oncontextmenu:preventDefault to disable the standard browser context menu. In the Grid's CustomizeElement event handler, subscribe to the contextmenu event (displays the custom Context Menu).

The GridContextMenuContainer component contains Context Menu components. The GridContextMenuHelper class implements Context Menu's item generation, manages state, and includes the click handlers that use the Blazor Grid's API to execute commands.

Files to Review

Documentation

Video

More Examples

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)