如何使用Enter选择项目并启用inline edit中的jqgrid双击 [英] how to select item using Enter and enable double click in jqgrid in inline edit

查看:101
本文介绍了如何使用Enter选择项目并启用inline edit中的jqgrid双击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

已观察:

  1. FedEx出现在通过"列中

  1. FedEx appears in Ship Via column

双击该行不会再开始内联编辑

Double click in this row not more starts inline edit

预期:

  1. 应显示Intime

  1. 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屋!

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