x291944973 2016-11-14 06:20 采纳率: 0%
浏览 1697

extjs的grid渲染数据出现空白段

有个grid需要加载一百多条数据,但是显示的时候,数据总条数和数据都是正确的,但是向下滑动滚动条,每隔47行就会出现一段空白,向下滑过空白段之后,再向上滑动滚动条时,空白段又会出现在36行。。。网上搜不到资料,有没有人遇到过相同的问题?或者能给我一些提示的?在线等,谢谢!
图片说明

补充代码:
//grid定义

        xtype: 'grid',
        id:'thirdPartyOrderListGrid',
        width: '100%',
        height: 415,
        viewConfig:{
            enableTextSelection : true,
            getRowClass:function(record, index, rowParams, store){
                 return record.get('flag')=='1'?"child-row":"";
            }
        },
        listeners:{
            itemdblclick:function(dataview,record, item, index, e){
                var win = Ext.widget("thirdPartyOrderHandEditWin");
                win.down("form").loadRecord(record);
                win.show();
            }
        },
        autoRender:true,
        columnLines: true,
        loadMask: true, //读取数据时的遮罩和提示功能即加载loding...
        resizable: true,
        forceFit: false,
        collapsible:false,
        titleCollapse:false,
        selModel : new Ext.selection.CheckboxModel(),
        plugins:[  
                 Ext.create('Ext.grid.plugin.CellEditing',{  
                     clicksToEdit:2 //设置单击单元格双击编辑  
                 })  
        ],
        store: Ext.create('Ext.data.Store', {
            fields:[{
                name : 'flag'
            },{
                name : 'errorMsg'
            },{
                name : 'orderId'
            },{
                name : 'skuId'
            },{
                name : 'iid'
            }
                ···
            ]
        }),
        columns : {
            items:[
                { text:'序号',xtype: 'rownumberer',width: 50},
                { text: 'flag',dataIndex: 'flag',width: 150,align: 'center',hidden:true},
                { text: '错误信息',dataIndex: 'errorMsg',width: 150,align: 'center',
                    renderer: function(value, meta, record) {//超长自动换行
                        meta.style = 'overflow:auto;padding: 3px 6px;text-overflow: ellipsis;white-space: nowrap;white-space:normal;line-height:20px;';   
                        return value;   
                   }
                },
                { text: '订单编号',dataIndex: 'orderId',width: 150,align: 'center'},
                { text: '平台商品码',dataIndex: 'skuId',width: 150,align: 'center'},
                { text: '平台商品款码',dataIndex: 'iid',width: 150,align: 'center'},
                ···
            ],
            defaults: {
                align: 'center',
                sortable:false,
                menuDisabled : true
            }
        },
        dockedItems : [{
            ···
        }]
        }]
    //grid的赋值
    form.submit( {
    waitMsg : '请稍等.....',
    url :  basePath + '···.spmvc',
    method : 'post',
    timeout:600000,
    params : formValues,
    success : function(form,action) {
        win.close();
        result = action.result;
        var batchList = result.batchList;
        console.dir(batchList);
        var store = Ext.getCmp('thirdPartyOrderListGrid').store;
        store.add(batchList);
    },
    failure : function(form,action) {
        Ext.Msg.alert('执行结果', action.result.msg);
    }
});

部分用省略号代替了,从代码上看不出什么问题···

  • 写回答

4条回答

  • 普通网友 2016-11-14 06:44
    关注

    你应该把代码贴出来,也许是代码什么地方出差

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题