具有互斥条件的 Jqgrid 内联编辑

Jqgrid Inline editing with mutually exclusive condition

jquery 网格 中是否有任何功能一次只能编辑一行?目前我们可以编辑多行。

以上查询是我同事发的。我们正在使用以下代码。

我们正在使用 Jquery.jqgrid-4.1.2.min.js

场景是:它允许我们同时编辑多行,但是一旦光标移动到另一行,第一行的保存和取消按钮仍然存在

        $("#AllocationsGrdList").jqGrid({
            url: '@Url.Action("ActionName", "Controller")/',
            datatype: "json",
            colNames: ['Category Name','Amount','Edit'],
            colModel: [
                { name: 'CategoryName', index: 'CategoryName', sortable: true, sorttype: 'text', width: 140, classes: 'bStyle' },
                {
                    name: 'Amount', index: 'Amount', width: 82, align: "right", editable: true, editrules: { number: true, required: true, custom: true, custom_func: Deductions }, formatter: 'currency',
                    formatoptions: { decimalSeparator: ".", thousandsSeparator: ",", decimalPlaces: 2, defaultValue: '0.00', prefix: '$ ' },
                    editoptions: {
                        style: 'width:70px;', dataEvents: [
                           {
                               type: 'blur',
                               fn: function (e) {
                                   CalculateDeductions($(this).val());// SOme DB Operation

                               }
                           }
                        ]
                    }
                },
                {
                    name: 'act', index: 'act', width: 60, align: 'center', sortable: false, formatter: 'actions',
                    formatoptions: {
                        keys: false,
                        delbutton: false,
                        onEdit: function (rowid) {
                        },
                        onSuccess: function (jqXHR) {
                            $("#AllocationsGrdList").trigger('reloadGrid');
                            return true;
                        },
                        onError: function (rowid, jqXHR, textStatus) {

                        },
                        afterSave: function (rowid) {
                        },
                        afterRestore: function (rowid) {
                            $("#AllocationsGrdList").trigger('reloadGrid');   
                        }
                    }
                }
            ],
            rowNum: 10, rowList: [10, 20, 30],
            sortname: 'CategoryName',
            shrinkToFit: true,
            sortable: true,
            viewrecords: true,
            sortorder: "desc",
            footerrow: true,
            width: '780',
            height: '100%',
            jsonReader:
                {
                    root: 'List',
                    page: 'Page',
                    total: 'TotalPages',
                    records: 'TotalCount',
                    repeatitems: false,
                    id: 'Id'
                },

            editurl: '@Url.Action("ActionName", "ControllerName")'
        });