Skip to main content

How to: Display a Context Menu For Column Headers

The example below handles the ASPxClientGridView.ContextMenu event to display a context menu when a user right-clicks within the column header panel.

The image below shows the result.

exContextMenu

<ClientSideEvents ContextMenu="function(s, e) {
            if(e.objectType == 'header') 
                headerMenu.ShowAtPos(ASPxClientUtils.GetEventX(e.htmlEvent), ASPxClientUtils.GetEventY(e.htmlEvent));
}" />