Popup on tableheader

I like to show a popupmenu when clicking on a tableheader, using the onSort() event.
Unfortunatly, when clicking on the tableheader, the source is not available in the onSort() property, so the popup can’t be displayed.
Any tips?

+1

Feature request posted for this: case 381922.