jqgrid 自带的navGrid编辑,提交后窗口还在,表格也没刷新。数据已存到数据库

jqgrid 自带的navGrid编辑,提交后窗口还在,表格也没刷新。数据已存到数据库

阅读 9k
1 个回答

在官网demo中有http://www.guriddo.net/demo/g...
下面是比较完整的写法,用到的属性就一个closeAfterEdit:true,编辑之后关闭弹框。如果是添加,则是closeAfterAdd:true,以此类推,具体参考官网,demo
$('#jqGrid').navGrid('#jqGridPager',

            // the buttons to appear on the toolbar of the grid
            { edit: true, add: true, del: true, search: false, refresh: false, view: false, position: "left", cloneToTop: false },
            // options for the Edit Dialog
            {
                editCaption: "The Edit Dialog",
                recreateForm: true,
                checkOnUpdate : true,
                checkOnSubmit : true,
                closeAfterEdit: true,
                errorTextFormat: function (data) {
                    return 'Error: ' + data.responseText
                }
            })