You can enable or disable the popup menu by using the ATTR_ENABLE_POPUP_MENU attribute in SetCtrlAttribute. I think there is no option to enable or disable individual items on the built-in popup menu.
An alternative approach could be to disable the built-in popup menu and create your own popup menu with RunPopupMenu on the EVENT_RIGHT_CLICK event in the table callback, disabling its items based on the position of the mouse (eventData parameters) to discriminate if it's on a row or column label.
You could use also GetTableCellFromPoint (panel, control, MakePoint (eventData2, eventData1), &cell);
but this function returns (0,0) if you click outside the data area (that is, even if you click on a row or column label), so you still will have to struggle wi
th x and y coordinates.
Inside your program you can decide whether to enable some (or all) popups or not.
Hope this helps
Roberto