Flexigrid - 如何关闭行选择
是否可以关闭 Flexigrid 上的行选择功能? 当您没有实现任何使用该选择的内容时,这有点烦人。
Is it possible to turn off the row selection feature on Flexigrid?
It's somewhat annoying when you haven't implemented anything that makes use of the selection.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不幸的是,Flibble 先生接受的答案并没有停止所有选择功能,它只是将其限制为一行。
要完全禁用它,请向 $.extend 块添加一个新属性(第 20 行左右),
然后在该行的 .click 部分(第 754 行左右)添加对该属性的检查
Unfortunately Mr Flibble's accepted answer does not stop all selection capability, it merely restricts it to one row.
To disable it completely, add a new property to the $.extend block (around line 20)
Then in the .click section of the row (around line 754) add a check for the property
结果您需要将 singleSelect 属性更改为 true。
Turns out you need to change the singleSelect property to true.
我知道这个线程有点旧,但我发现它正在寻找同样的东西。 singleSelect 对我不起作用,因为我不想选择任何行。我发现我可以用一行代码删除任何行选择:
这门课程删除表行上的所有绑定,因此如果您需要绑定,除非您稍后重新绑定,否则您将不会拥有它,但我需要删除所有绑定我的桌子上的行选择。我不需要接触 flexigrid 代码来做到这一点,我比以前的答案更喜欢一点。
I know this thread is a bit old but I came upon it looking for the same thing. The singleSelect didn't work for me as I didn't want to be able to select any row. I found that I could remove any row selection with a single line of code:
This a course removes all bindings on the table row so if you needed the binding you won't have it unless you rebind later but I needed to remove any and all row selection on my table. I didn't need to touch the flexigrid code to do so which I liked a bit more than previous answers.