gpt4 book ai didi

jquery - JQGrid : deselect event

转载 作者:行者123 更新时间:2023-12-01 04:47:52 25 4
gpt4 key购买 nike

使用JQGrid,我知道选择一行时的onSelectRow事件。

我想知道当您因为选择了另一行而取消选择一行时是否会发生事件。

谢谢

最佳答案

您仍然可以创建自定义事件:

onSelectRow: function (id) {
if (this.lastSel && id && id !== this.lastSel) {
$(this).trigger('deselectRow', [this, this.lastSel]);
}
this.lastSel = id;
}

然后绑定(bind)事件:

$("#grid").on('deselectRow', function(e, table, rowId){
console.log(rowId); // $('#'+rowId, table);
});

-DEMO-

关于jquery - JQGrid : deselect event,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26631903/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com