如何使用Enter选择项目并启用inline edit中的jqgrid双击 [英] how to select item using Enter and enable double click in jqgrid in inline edit
问题描述
Enter不能在嵌入式编辑中的select元素中选择项目,并且会阻止双击.
Enter does not select item in select element in inline edit and blocks double click.
复制步骤:
打开 http://trirand.com/blog/jqgrid/jqgrid.html
在IE9中
选择
行编辑(新) 输入类型
Row Editing (new) Input types
双击第一行台式计算机" 开始内联编辑
Double click in first row "Desktop computer" to start inline edit
单击第一行FedEx字段中的运送通过"列以打开下拉菜单.
Click in "Ship via" column in first row FedEx fiel to open dropdown.
按向下箭头键选择Intime
Press Down arrow key to select Intime
按Enter
已观察:
-
FedEx出现在通过"列中
FedEx appears in Ship Via column
双击该行不会再开始内联编辑
Double click in this row not more starts inline edit
预期:
-
应显示Intime
Intime should appear
双击将行再次置于内联编辑模式.
Double click should put row in inline edit mode again.
如何解决?
推荐答案
I suggest to solve the problem like in the change. The idea is very easy. Is one change focus many required finalization actions can be done in the current control. For example in case of <select>
the 'change' event will be fired, onfocusout
will be called and popup menus (context menu or datepicker) will be closed and so on.
所以我建议添加行
$(ta).closest("tr.jqgrow").focus();
在之后的"keydown"事件处理程序内线.您可以在演示上看到的结果.
inside of 'keydown' event handler after the line. The results you can see on the demo.
这篇关于如何使用Enter选择项目并启用inline edit中的jqgrid双击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!