动态退出jQGrid中的编辑对话框

时间:2013-07-24 15:47:22

标签: jqgrid edit dialog

这就是我想要实现的目标:

每当用户选择要编辑的行时,我想检查特定列的该行的值。如果找到我要查找的值,那么我想显示一条消息并关闭编辑对话框。到目前为止,这是我提出的:

    // Options for EDIT 

    {height:280,mtype: "POST",closeAfterEdit: true,reloadAfterSubmit:true, url:'gridedit.jsp',

        recreateForm: true, 

        //set some properties beofre the dialog box is seen by the user

       beforeShowForm: function(form) {

            /*$('#adate',form).attr('readonly','readonly');
            $('#account',form).attr('hidden','true');*/

            $('#adate',form).hide();
            $('#account',form).hide();
            var sel_id = $("#list").jqGrid('getGridParam', 'selrow');
            var value = $("#list").jqGrid('getCell', sel_id, 'mod');

            if(value=='n'){
                alert('NOOOOOOOOOOOOOOO!')
            }
        }
    }

警告后,如何关闭编辑对话框?现在,警告后会出现对话框。

1 个答案:

答案 0 :(得分:1)

找到了答案:

我只需要写

    form.close();
警告后

相关问题