Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/393.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jqgrid-单击行时如何显示编辑表单?_Javascript_Jquery_Jqgrid - Fatal编程技术网

Javascript jqgrid-单击行时如何显示编辑表单?

Javascript jqgrid-单击行时如何显示编辑表单?,javascript,jquery,jqgrid,Javascript,Jquery,Jqgrid,我需要在单击行或单击自定义按钮时显示编辑表单。 我可以获取单击的行的id,但是如何显示表单和编辑此行?通常我将使用对话框显示表单。这是示例代码,看看是否满足您的要求 $('#button').click(function () { showDialog("Your URL ",'TITLE', 400, 320); }); function showDialog(url, title, iwidth, iheight) { var dial

我需要在单击行或单击自定义按钮时显示编辑表单。
我可以获取单击的行的id,但是如何显示表单和编辑此行?

通常我将使用对话框显示表单。这是示例代码,看看是否满足您的要求

$('#button').click(function () {
            showDialog("Your URL ",'TITLE', 400, 320);
        });



    function showDialog(url, title, iwidth, iheight) {

var dialog = $('<div id="divpopup"><iframe id="iframedit" src="' + url + '" style="width:' + iwidth + 'px;height:' + iheight + 'px;"  frameborder="0" ></iframe></div>').appendTo('body');
//dialog.remove();
dialog.dialog({
    title: title,
    autoResize: true,
    height: 'auto',
    width: 'auto',
    modal: true,
    position: 'center',
    draggable: true,
    open: function (type, data) { },
    close: function (type, data) { }
})
);
}
使用jQuerygrid_id.jqGrid'editGridRow',rowid,properties


有关更多详细信息,请参见

未提供解决问题的任何线索