Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

How to simple overwrite showContextMenu on all columns of a grid?

$
0
0

If I overwrite showContextMenu on a grid it only add additional menu to the pop up menu when I click on a grid but do not click on any column. One way is to overwrite showContextMenu on all columns in grid but this solution does not looks right. Is there some better way how to insertItem to showContextMenu on all columns of a grid?

 

I am using AX 2012.

 

Standard code works only if grid is clicked but not a single column of a grid.

 

    int ret,ii;

    int                     deleteAttachment= 2;

    PopupMenu               popupMenu = PopupMenu::create(_menuHandle);

    FormListItem item;

    ;

    deleteAttachment = popupMenu.insertItem('My menu');

 

    ret = super(_menuHandle);

 

    if(ret == deleteAttachment)

    {

        ii = attachmentList.getNextItem(FormListNext::Selected);

        attachmentList.delete(ii);

    }

 

    return ret;


Viewing all articles
Browse latest Browse all 9880

Trending Articles