属性“inlineEdit:true”在jqgrid? [英] Properties "inlineEdit:true" in jqgrid?

查看:96
本文介绍了属性“inlineEdit:true”在jqgrid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jqgrid中的属性inlineEdit:true?
,例如代码是:

There properties "inlinetrue" in jqgrid? for example code is :

rowNum:10,
        rowList:[10,40,70],
        pager: '#rowsTransaksi',
        sortname: 'depositType',
        viewrecords: true,
        sortorder: "desc",
        caption:"Payee Accounts",
        forceFit : true,
        cellEdit: true,
***inlineEdit:true***
        inlineEdit:true,
        editurl:"noabjad.json",


推荐答案

您可以使用以下 onSelectRow 事件处理程序:

You can use for example the following onSelectRow event handler:

onSelectRow: function (rowid) {
    if (rowid !== lastSel) {
        myGrid.jqGrid('saveRow', lastSel);
        lastSel = rowid;
    }
    myGrid.jqGrid('editRow', rowid, true, function(){
        $("input, select", e.target).focus();
    });
}

它实现了非常接近单元格编辑的行为,但整体行将在编辑模式中设置。从修改版本 https://stackoverflow.com/questions/6937622/what-the-purpose-of-positionlast-in-jqgrid/6945318#6945318>另一个问题。

It implements the behavior which are very close to the cell editing, but the whole row will be set in the editing mode. See the modified version of the demo from your another question.

这篇关于属性“inlineEdit:true”在jqgrid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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