Vimalan Jaya Ganesh Vimalan Jaya Ganesh - 2 years ago 263
Javascript Question

jqGrid - suppress row selection on right click

In jqGrid, I want to disable row selection on right click. But, want to have the normal behavior (row selection on left click) enabled.

I tried to disable row selection on right click using the following code, but it does not have any effect,

onRightClickRow: function (rowid, iRow, iCol, e) {
return false;



  • Row should not be selected or deselected (if previously selected) on right click in a jqGrid.

I am using jqGrid 4.6.0. Any suggestion will be appreciated.

Answer Source

You can do what this post suggests: Disable row select in jqGrid on right click

onRightClickRow: function () {
    return false;

It works, but just from playing around with it I noticed it unselects the previously selected row, which might not be ideal. If that's not a problem than this should be sufficient!


If you want to maintain the previously selected row, you'll have to do something a little different.




This works, but disables the onRightClickRow event entirely.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download