Good day @EricR ,
The headermenu is based on ui.context only in terms of the structure and api of the menu (it is also a popup that is shown after mouse right click). It looks and behaves as if it is a “real” context menu.
However, the onBeforeContextMenu event works only with the ui.context, which can be connected for data, or the browser context menu. You can see that the event is actually working by right-clicking on the datatable cells and checking the console: Code Snippet .
To catch the moment before the headermenu is shown, you may use the onBeforeShow / onShow events.
Also, please, note that these handlers have to be set outside the headermenu:{ } config. Otherwise, they will interrupt the predefined handlers in on:{ } property.
Please, check the example: Code Snippet .