0

In Dojo, how to add onCellContextMenu on specific grid cells only (or anyone column). Currently, it appears that the context menu is added to all cells (i.e. columns) of all rows of the grid.

This does not require code to be pasted.

1
  • you need to post what you have tried so far and then ask for the suggestion.
    – bajji
    Commented Dec 29, 2017 at 16:09

1 Answer 1

0

There is no built in function to do what you whant, but I think you can create some workaround using menu events:

Listening to Menu Events There will be four events fired corresponding to the appropriate menu types:

<...>

onCellContextMenu(e)

<...>

Take a look in Documentation.

So my general suggestion is to create custom handler for event like onCellContextMenu and check if it's allowed to show menu there or not. If not - prevent following event processing.

dojo.connect(grid, 'onCellContextMenu', function(e){
   //Perform check here
});

It's just an idea, I haven't tried it by myself. Hope it will help.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.