jqGrid自定义调用可编辑模式窗体

jqGrid自定义调用可编辑模式窗体,jqgrid,free-jqgrid,Jqgrid,Free Jqgrid,我使用jqGrid 4.9.3-pre-free 本例为ok-soft-gmbh.com(Oleg): 但我在代码行中写了: ondblClickRow: function (rowid) { $(this).jqGrid("viewGridRow", rowid, { caption: "Details of the invice" }); } 每个新挑战的模式窗口都在向下移动。 我找到了一行,其中更改: if (!o.recreateForm) {

我使用jqGrid 4.9.3-pre-free 本例为ok-soft-gmbh.com(Oleg):

但我在代码行中写了:

ondblClickRow: function (rowid) {
    $(this).jqGrid("viewGridRow", rowid, { caption: "Details of the invice" });
}
每个新挑战的模式窗口都在向下移动。 我找到了一行,其中更改:

        if (!o.recreateForm) {
            var formProp = $self.data("formProp");
            console.log(formProp)
            if (formProp) {
                formProp.top = Math.max(formProp.top, 0);
                formProp.left = Math.max(formProp.left, 0);
                $.extend(o, formProp);
            }
        }
每次调用都会增加一个模式窗口
formProp.top
formProp.left

如何解决这个问题


对于奥列格:ббббббббббб!查看网格行编辑网格行。Тут по большей части только вы можете помочь. 顶部和左侧。谢谢你的错误报告!我刚刚发帖了。它修改了内部
savePositionOnHide
函数的代码,该函数用于从

savePositionOnHide=函数(propName,frmgr,h){
var$w=h.w,$form=$(frmgr),$gbox=this.closest(“.uijqgrid”),顶部,左侧;
如果($.contains($gbox[0],$w[0])){
//我们使用下面的.style.height和.style.width来正确保存“自动”和“100%”值
//“px”后缀也将被保存,但这不是问题
top=getCssStyleOrFloat($w,“top”);
左=getCssStyleOrFloat($w,“左”);
}否则{
顶部=$w.offset().top-
($gbox.offsetParent().offset().top+
$gbox.offset().top+
$gbox.position().top+
parseFloat($gbox.css(“边框顶部宽度”)| | 0));
左=$w.offset().left-
($gbox.offsetParent().offset().left+
$gbox.offset().left+
$gbox.position().左+
parseFloat($gbox.css(“边框左宽度”)| | 0));
}
此.data(propName{
top:top,//parseFloat($w.css(“top”),
left:left,//parseFloat($w.css(“left”),
宽度:getCssStyleOrFloat($w,“width”),//$(h.w).width(),
高度:getCssStyleOrFloat($w,“height”),//$(h.w).height(),
dataheight:getCssStyleOrFloat($form,“height”)| |“auto”,
datawidth:getCssStyleOrFloat($form,“width”)| |“auto”
});
$w.remove();
if(h.o){h.o.remove();}
}

savePositionOnHide=函数(propName,frmgr,h){
var$w=h.w,$form=$(frmgr),$gbox=this.closest(“.ui-jqgrid”),
GetToporLeft RelativeToGBox=函数(topOrLeft){
返回$w.offset()[topOrLeft]-
($gbox.offsetParent().offset()[topOrLeft]+
$gbox.offset()[topOrLeft]+
$gbox.position()[topOrLeft]+
parseFloat($gbox.css(“border-”+topolleft+“-width”)| | 0);
};
此.data(propName{
顶部:getTopOrLeftRelativeToGbox(“顶部”),
左:getTopOrLeftRelativeToGbox(“左”),
宽度:getCssStyleOrFloat($w,“宽度”),
高度:getCssStyleOrFloat($w,“高度”),
dataheight:getCssStyleOrFloat($form,“height”)| |“auto”,
datawidth:getCssStyleOrFloat($form,“width”)| |“auto”
});
$w.remove();
if(h.o){h.o.remove();}
},

我希望在表单编辑的所有输入参数组合的情况下,问题得到解决。至少现在演示可以正常工作了。

谢谢您的错误报告!我刚刚发帖了。它修改了内部
savePositionOnHide
函数的代码,该函数用于从

savePositionOnHide=函数(propName,frmgr,h){
var$w=h.w,$form=$(frmgr),$gbox=this.closest(“.uijqgrid”),顶部,左侧;
如果($.contains($gbox[0],$w[0])){
//我们使用下面的.style.height和.style.width来正确保存“自动”和“100%”值
//“px”后缀也将被保存,但这不是问题
top=getCssStyleOrFloat($w,“top”);
左=getCssStyleOrFloat($w,“左”);
}否则{
顶部=$w.offset().top-
($gbox.offsetParent().offset().top+
$gbox.offset().top+
$gbox.position().top+
parseFloat($gbox.css(“边框顶部宽度”)| | 0));
左=$w.offset().left-
($gbox.offsetParent().offset().left+
$gbox.offset().left+
$gbox.position().左+
parseFloat($gbox.css(“边框左宽度”)| | 0));
}
此.data(propName{
top:top,//parseFloat($w.css(“top”),
left:left,//parseFloat($w.css(“left”),
宽度:getCssStyleOrFloat($w,“width”),//$(h.w).width(),
高度:getCssStyleOrFloat($w,“height”),//$(h.w).height(),
dataheight:getCssStyleOrFloat($form,“height”)| |“auto”,
datawidth:getCssStyleOrFloat($form,“width”)| |“auto”
});
$w.remove();
if(h.o){h.o.remove();}
}

savePositionOnHide=函数(propName,frmgr,h){
var$w=h.w,$form=$(frmgr),$gbox=this.closest(“.ui-jqgrid”),
GetToporLeft RelativeToGBox=函数(topOrLeft){
返回$w.offset()[topOrLeft]-
($gbox.offsetParent().offset()[topOrLeft]+
$gbox.offset()[topOrLeft]+
$gbox.position()[topOrLeft]+
parseFloat($gbox.css(“border-”+topolleft+“-width”)| | 0);
};
此.data(propName{
顶部:getTopOrLeftRelativeToGbox(“顶部”),
左:getTopOrLeftRelativeToGbox(“左”),
宽度:getCssStyleOrFloat($w,“宽度”),
高度:getCssStyleOrFloat($w,“高度”),
dataheight:getCssStyleOrFloat($form,“height”)| |“auto”,
datawidth:getCssStyleOrFloat($form,“width”)| |“auto”
});
$w.remove();
if(h.o){h.o.remove();}
},
我希望我能解决这个问题