English 中文(简体)
在ClickRow
原标题:Adding a Context Menu to jqGrid s onRightClickRow

我在“权利中心”活动范围内,在我的支部之外,还遇到困难。 在右侧点上点击之后,我想从“权利ClickRow”活动获得输血、iRow和iCol值。

然而,我面临的问题是,我第一次在电网的一个囚室点上点击情况菜单。 我第二次在一间囚室上点击了情况菜单,但第一个被正确地点击的囚室里都存在输血、iRow和iCol值。 因此,row、iRow和iCol从来没有与被点击的囚室相匹配。

就背景而言,我使用jquery.contextmenu.r2.js

这里是我拥有的 j干法。

jQuery("#list").jqGrid({
    url:urlPath,
    datatype:"json",
    mtype: GET ,
    jsonReader: {
        root: function (obj) { return obj.result; },
        id: dataID,
        repeatitems: false,
        page:  function(obj) { return 1; },
        total: function(obj) { return 1; },
        records: function(obj) { return obj.result.length; }        
    },
    colNames: columnNames,
    colModel: columnModel,
    onRightClickRow: function (rowid, iRow, iCol, e) {
        jQuery("#list").contextMenu( rightClickMenu , {
            bindings: {
                 DisplayiRow : function(t) {
                    alert( DisplayiRow:   + iRow);   
                },
                 DisplayiCol : function(t) {
                    alert( DisplayiCol:   + iRow);
                }
            }
        })
    },
    scroll:1,
    headertitles: true,
    pager:  #pager ,
    shrinkToFit: false,
    autowidth: true,
    height: gridHeight,
    sortable: true,
    sortorder:  desc ,
    viewsortcols:[true, vertical , true],
    viewrecords: true,
    gridview: true,
    loadonce: true
  });
  jQuery("#list").jqGrid( filterToolbar , {searchOnEnter:false,defaultSearch: cn });
});

页: 1

<div class="contextMenu" id="rightClickMenu" style="display:none">
    <ul>
       <li id="DisplayiRow">
           DisplayiRow</li>
       <li id="DisplayiCol">
           DisplayiCol</li>
   </ul>
</div>

是否有办法在适当点击的情况下把菜单添加到“权利ClickRow”活动上,以便我能够得到被点击的囚室的row、iRow和iCol值?

问题回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签