JqGrid虚拟滚动导致div';bdiv内的s具有错误的高度

JqGrid虚拟滚动导致div';bdiv内的s具有错误的高度,jqgrid,Jqgrid,DOM如下所示: 看起来是jqGrid API造成的。我们已将scroll设置为true,这是虚拟分页已打开。在某些情况下,网格中的几行被填充,在DOM检查中,我们看到了这些副作用。有JQGrid经验的人能解释发生了什么以及如何解决这个问题吗 jQuery(document).ready(function() { jQuery('#ContentPanel1__01TestCustomerList').jqGrid( {

DOM如下所示:


看起来是jqGrid API造成的。我们已将scroll设置为true,这是虚拟分页已打开。在某些情况下,网格中的几行被填充,在DOM检查中,我们看到了这些副作用。有JQGrid经验的人能解释发生了什么以及如何解决这个问题吗

    jQuery(document).ready(function() {
        jQuery('#ContentPanel1__01TestCustomerList').jqGrid(
           {
              datatype:function(postdata) {            
                $('#ContentPanel1__01TestCustomerList').listContentPart('getData', postdata); },
             page: 1,
             colNames: ["A/C Ref","Name","Short Name","Credit Limit"],colModel: [{"classes":"sage200-gridCell","name":"CustomerAccountNumber","index":"CustomerAccountNumber","formatter":DefaultFormat,"unformat":unformatField,"searchoptions":{"attr":{"title":"contains"},"sopt":["eq","ne","cn","nc","bw","bn"]}},{"classes":"sage200-gridCell","name":"CustomerAccountName","index":"CustomerAccountName","formatter":DefaultFormat,"unformat":unformatField,"searchoptions":{"attr":{"title":"contains"},"sopt":["eq","ne","cn","nc","bw","bn"]}},{"classes":"sage200-gridCell","name":"CustomerAccountShortName","index":"CustomerAccountShortName","formatter":DefaultFormat,"unformat":unformatField,"searchoptions":{"attr":{"title":"contains"},"sopt":["eq","ne","cn","nc","bw","bn"]}},{"classes":"sage200-gridCell","name":"CreditLimit","index":"CreditLimit","formatter":CurrencyFormat,"unformat":unformatField,"searchoptions":{"attr":{"title":"equals"},"sopt":["eq","ne","lt","le","gt","ge"]}}],
viewrecords: true,
scrollrows: false,
prmNames: { id: "CustomerAccountNumber" },
shrinkToFit: false,
pager: jQuery('#ContentPanel1__01TestCustomerList_pager'),
onSelectRow: function (a,b) { OnRowSelect('ContentPanel1__01TestCustomerList', a, b); },
ondblClickRow: function (event){ GridDoubleClick(event.target); },
loadError: jqGrid_aspnet_loadErrorHandler,gridComplete: function () { $("#ContentPanel1__01TestCustomerList").listContentPart("onInit"); },
resizeStop: function(newWidth, index) { $("#ContentPanel1__01TestCustomerList").listContentPart("onColumnResize", newWidth, index); },
hoverrows: false,
scroll: 1,
rowNum: 25,
rowList: [10,20,30],
editDialogOptions: {"recreateForm":true,errorTextFormat:function(data) { return 'Error: ' + data.responseText },editData:{ __RequestVerificationToken: jQuery('input[name=__RequestVerificationToken]').val() }},addDialogOptions: {"recreateForm":true,errorTextFormat:function(data) { return 'Error: ' + data.responseText },editData:{ __RequestVerificationToken: jQuery('input[name=__RequestVerificationToken]').val() }},delDialogOptions: {"recreateForm":true,errorTextFormat:function(data) { return 'Error: ' + data.responseText },delData:{ __RequestVerificationToken: jQuery('input[name=__RequestVerificationToken]').val() }},searchDialogOptions: {onReset:ContentPanel1_onReset,"multipleSearch":true,"sFilter":"ObeyOperatorFilters",onInitializeSearch:ContentPanel1_onInitializeSearch,afterRedraw:ContentPanel1_afterRedraw,"modal":true,"Find":"Apply",onSearch:ContentPanel1_onSearch,"width":600,beforeShowSearch:ContentPanel1_beforeShowSearch,"recreateForm":true,"caption":"Advanced Filter"},jsonReader: {id:"id",page:function (obj) { return obj.page; },root:function (obj) {return obj.$resources;},records:function (obj) { return obj.$totalResults;},total:function (obj) { return obj.total; },repeatitems:false},sortorder: 'asc',multiselect: true,width: '250',height: '200',viewsortcols: [false,'vertical',true]})
    .navGrid('#ContentPanel1__01TestCustomerList_pager',{"edit":false,"add":false,"del":false,"search":true,"refresh":true,"view":false,"position":"left","cloneToTop":true},jQuery('#ContentPanel1__01TestCustomerList').getGridParam('editDialogOptions'),jQuery('#ContentPanel1__01TestCustomerList').getGridParam('addDialogOptions'),jQuery('#ContentPanel1__01TestCustomerList').getGridParam('delDialogOptions'),jQuery('#ContentPanel1__01TestCustomerList').getGridParam('searchDialogOptions') );
    function jqGrid_aspnet_loadErrorHandler(xht, st, handler) {jQuery(document.body).css('font-size','100%'); jQuery(document.body).html(xht.responseText);};});

您是否已将
overflow-y
设置为
scroll
auto
?你能发布一个截图吗?你能发布可以用来复制程序的网格(演示)吗?@Oleg我已经发布了jqgridcode@chugh97:对不起,我现在在另一个国家的一位客户处,无法回答您的问题。我看到的一件事是
datatype
as函数的用法。我认为你不能把它和虚拟滚动结合起来。我建议永远不要使用
数据类型
作为函数,并且尽快不要使用虚拟滚动。在您的情况下,您选择了我所知道的好产品jqGrid中最差的两个功能,并尝试将它们一起使用……您是否将
overflow-y
设置为
滚动
自动
?你能发布一个截图吗?你能发布可以用来复制程序的网格(演示)吗?@Oleg我已经发布了jqgridcode@chugh97:对不起,我现在在另一个国家的一位客户处,无法回答您的问题。我看到的一件事是
datatype
as函数的用法。我认为你不能把它和虚拟滚动结合起来。我建议永远不要使用
数据类型
作为函数,并且尽快不要使用虚拟滚动。在您的案例中,您选择了我所知道的好产品jqGrid中最差的两个特性,并尝试将它们一起使用。。。