How to create jqGrid Context Menu?

前端 未结 3 1885
余生分开走
余生分开走 2020-11-30 05:13

I am trying to create a context menu on jqGrid (for each row) but can\'t find how to do so.I am currently using jQuery Context Menu (is there a better way? )but it is for th

3条回答
  •  感情败类
    2020-11-30 06:00

    you can have a look at the onRightClickRow event

    JqGridWiki

    jQuery("#gridid").jqGrid({
    ...
       onRightClickRow: function(rowid, iRow, iCol, e){ 
          //Show context menu ...
    
       },
    ...
    })
    

    From Wiki ... onRightClickRow

    Event Name

    onRightClickRow

    Parameters

    rowid, iRow, iCol, e

    Information

    Raised immediately after row was right clicked. rowid is the id of the row, iRow is the index of the row (do not mix this with the rowid), iCol is the index of the cell. e is the event object. Note - this event does not work in Opera browsers, since Opera does not support oncontextmenu event

提交回复
热议问题