【问题标题】:Is is possible to show subgrid on Mousehover on particular row in jqgrid是否可以在 jqgrid 的特定行上的 Mousehover 上显示子网格
【发布时间】:2013-09-14 12:30:58
【问题描述】:

我有一个 jqgrid,我需要在鼠标悬停在特定行上时显示一个子网格...但我不知道是否有相同的可能性...

我正在通过 ajax 调用将 json 数据本地绑定到我的 jqgrid 中...是否有任何事件让 onmouse 悬停在 Jqgrid rowid 上...

任何对此工作或有想法的人请指导正确的方向......

这是我的加载细节...

$(document).ready(function () {
    $("#go").click(function () {
        $("#gridId").GridUnload();
        gridload();
    });
});

提前谢谢..

【问题讨论】:

    标签: jqgrid subgrid


    【解决方案1】:

    人们可以用不同的方式解释“我需要在鼠标悬停时显示子网格”下的意思。我想您需要将子网格用于悬停行。

    我从the answer 修改了演示,以演示该要求的一种可能实现。结果你可以看到here。该实现包括在loadComplete 回调中插入以下代码:

    loadComplete: function () {
        var $this = $(this);
    
        $this.find(">tbody>.jqgrow")
            .mouseenter(function (e) {
                if ($(this).find(">td.ui-sgcollapsed").length > 0) {
                    $this.jqGrid("expandSubGridRow", this.id);
                }
            });
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-31
      • 2023-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多