如何启用起来的jqGrid联编辑/向下箭头键 [英] How to enable up/down arrow keys in jqgrid inline edit

查看:1408
本文介绍了如何启用起来的jqGrid联编辑/向下箭头键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现卓越像订单详情编辑网格。

How to implement excel like order detail edit grid.

本格应该是这样的Excel:

This grid should be like excel:


  1. preferably向上/向下箭头键移动到previous /下一行,并启动细胞编辑

  2. 所有细胞始终处于编辑模式或编辑模式启动,如果向上/向下箭头键为pressed或细胞获得焦点
    以任何其他方式。

  3. 标签移到下一单元格行

  4. 提交按钮将在服务器中的所有行ASP .NET MVC控制器

是否合理/如何实现这一点使用的jqGrid?
我发现不允许使用上下方向键,如果在编辑模式下移到下一个/ previous行的所有jqGrid的例子。
如果jqGrid的是不是合理的,在哪里可以找到可用于实现该其他免费的组成部分?
在哪里可以找到样本code这个?

Is it reasonable/how to implement this using jqGrid ? All jqGrid examples which I have found does not allow to use up down arrow keys to move next / previous row if in edit mode. If jqGrid is not reasonable, where to find other free component which can used to implement this ? Where to find sample code for this?

更新1

我提出的问题更presice,希望简单:

I made question more presice and hopefully simpler:

如何启用上下的jqGrid中联编辑模式下箭头键

How to enable up and down arrow keys in inline edit mode in jqgrid

如何强制向上箭头键移动previous行和向下箭头键到下一行联编辑模式?

How to force up arrow key to move previous row and down arrow key to next row in inline edit mode?

Desiread动作可以是:

Desiread action may be:


  1. 当前行应该保存

  2. 如果保存成功和下一首/ previous行存在,重点应转移到该行中同一列

  3. 内联编辑应该开始和当前列shoudl是相同的。

链接这奥列格提供节目转移到下一个/ $ P $光伏电池在同一行中的单元格编辑模式。如何移动到下一个/ previous行中联编辑。即使SOEM下面可以实现的步骤,它使jqGrid的快速数据输入更加有用。我试过code以下,但它不工作,因为可能存在的ARA在其他行没有输入elemement。解决办法是强制的jqGrid显示在编辑模式下的所有单元格,则可以使用该code。不知道这是合理/如何实现。

Link which Oleg provides shows moving to next/prev cell in same row in cell editing mode. How to move to next /previous row in inline edit. Even if soem of the steps below can implemented, it makes jqGrid more usable for fast data entry. I tried code below but it does not work since probably there ara no input elemement in other row. Solution would be to force jqgrid to show all cells in edit mode, then this code can be used. no idea is this reasonable/how to implement.

<script>
$(document).ready(function () {
    $("input.cell").keyup(function (e) {
        switch (e.keyCode) {
            // up arrow        
            case 40:
                $(this).parent()
                    .parent()
                    .next()
                    .children("td")
                    .children("input.cell[name="
                        + $(this).attr("name") + "]")
                    .focus();
                break;

            // down arrow        
            case 38:
                $(this).parent()
                    .parent()
                    .prev()
                    .children("td")
                    .children("input.cell[name="
                        + $(this).attr("name") + "]")
                    .focus();
                break;
        }
    });
});</script>

jqGrid的编辑和&QUOT添加行;标签&QUOT;关键提供Tab键拯救排样,我应该尝试使用这个code或其他想法SOVE呢?

jqgrid edit and add rows with "tab" key provides sample of saving row on Tab key, should I try to sove it using this code or other idea?

推荐答案

我花了一整天研究的jqGrid在我们的软件使用,而该工具提供了很多潜在的,有什么你问来完成,似乎只有通过激烈的定制是可能的。我希望有人回应,证明我是错的,但我想你和我都留给自己扩展它来添加此功能。

I have spent an entire day researching jqGrid for use in our software, and while the tool provides a lot of potential, what you're asking to accomplish seems to only be possible through intense customization. I hope someone responds and proves me wrong, but I think you and I are left to extend it ourselves to add this functionality.

真够,这将是如果它有这个功能外的开箱非常有价值。

Shame really, it would be incredibly valuable if it had this functionality out-of-the-box.

这篇关于如何启用起来的jqGrid联编辑/向下箭头键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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