SHift单击jqgrid multiselect缺少最后一行 [英] SHift-click jqgrid multiselect missing last row

查看:101
本文介绍了SHift单击jqgrid multiselect缺少最后一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我采用了这篇文章中的代码并制作了这个小提琴。尝试单击第一行,然后按住Shift键单击最后一行。如果您注意到此代码执行得很好,除最后一行外,您单击的行不会被选中。我一直在摸着这个。任何人都可以帮我改变代码,以便multiselect也选择最后一行吗?

I adopted the code from this post and made this fiddle. Try clicking the first row, then shift-clicking the last row. If you notice this code does very well, except the last row, the row that you click on, does not get selected. I have been scratching my head on this one. Can anyone help me alter the code so that the multiselect selects the last row too?

谢谢!

推荐答案

尝试替换此: if((shouldSelectRow = id == startID || shouldSelectRow)){ with this:

try replacing this: if ((shouldSelectRow = id == startID || shouldSelectRow)) { with this:

if ((shouldSelectRow = id == startID || shouldSelectRow) && (id != rowid)){

这篇关于SHift单击jqgrid multiselect缺少最后一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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