是否可以停止选择和/或突出显示jqGrid行? [英] Is it possible to Stop jqGrid row(s) from being selected and/or highlighted?

查看:73
本文介绍了是否可以停止选择和/或突出显示jqGrid行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了文档,但是我我一直找不到答案.有没有一种方法可以防止选中时突出显示行?甚至停止该行的一种方法都被选中了.我喜欢"hoverrows:true"选项,但理想情况下,我希望停止单击时选择行.

I've looked at the documentation but I've been unable to find an answer. Is there a way to prevent a row from being highlighted when selected? That or even a way to stop the row being selected at all. I like the "hoverrows: true" option, but ideally I would like to stop a row from being selected on-click.

谢谢

更新: 我已经能够偷偷地"实现似乎是临时修复的功能.我一点都不喜欢它,如果有的话,理想情况下希望有一个更好的解决方案.

Update: I've been able to "hackily" implement something which seems to be an interim fix. I don't really like it at all and would idealy like a better solution, if there is one...

我发现如果我通过了该选项

I have found that if I pass the option

onSelectRow: function(rowid, status) {
    $('#'+rowid).removeClass('ui-state-highlight');
}

当实例化jqGrid时,可以在添加突出显示时将其剥离.

when I instantiate the jqGrid, I can strip the highlight when it is added.

还有另一种更理想的方法吗?

Is there another, more ideal, way to do this?

推荐答案

使用以下代码:

beforeSelectRow: function(rowid, e) {
    return false;
}

这篇关于是否可以停止选择和/或突出显示jqGrid行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆