zoukankan      html  css  js  c++  java
  • Ext 序号递增问题

    Ext序号默认是不会递增的

    写法如下

    new Ext.grid.RowNumberer({header:"序号",35})


    如需递增写法如下

    {header:"序号",35,
           renderer:function(value,metadata,record,rowIndex, colIndex, store){
                 var start = store.lastOptions.params.start;
                  if (isNaN(start)) 
                  {
                     start = 0;
                  }
                  return start + rowIndex + 1;
              }
    }

     Ext 刷新时,刷新当前页

    Ext.getCmp('GridID').getBottomToolbar().cursor//获取当前页面

    完整代码如下

        QDFAGrid = new Ext.grid.GridPanel({
            store : modelStore,
            width : '100%',
            plugins : expander,
            //tbar : toolbar,
            autoScroll : true,
            loadMask : false,
            cm : cm,
            id : 'QDFAGrid',
            bbar : new Ext.PagingToolbar({
                // 20条记录
                pageSize : 25,
                store : modelStore,
                displayInfo : true,
                displayMsg : '当前显示{0} - {1}条,共{2}条数据',
                emptyMsg : "没有记录",
                doRefresh : function() { // 刷新按钮
                    modelStore.load({
                        params : {
                            start : Ext.getCmp('QDFAGrid').getBottomToolbar().cursor,//获取当前页
                            limit : 25,
                            index_series_code : index_series_code,
                            version_id : version_id,
                            i_com_pro_id : i_com_pro_id,
                            dept : dept,
                            year : year,
                            month : month,
                            region_type : region_type,
                            heap : heap,
                            is_tz : is_tz,
                            outageEventOId:outageEventOId,
                            BUREAU_ID : Ext.getCmp('ORG_ID').getValue(),
                            IF : Ext.getCmp('IF_ID').getValue(),
                            OUTAGE_S_TIME : Ext.util.Format.date(Ext.getCmp('OUTAGE_DATE_DEBIN').getValue(),'Y-m-d H:i:s'),
                            OUTAGE_E_TIME : Ext.util.Format.date(Ext.getCmp('OUTAGE_DATE_END').getValue(),'Y-m-d H:i:s'),
                            OE_TYPE : Ext.getCmp('OE_TYPE_ID').getValue()
                        }
                    });
                }
            })
        });
  • 相关阅读:
    python os模块汇总
    python xlsxwriter使用方法汇总
    python 虚拟环境生成requirements.txt 和利用requirements.txt批量安装
    python 中将大列表拆分成小列表
    python print的用法
    python学习
    浮躁
    在线绘图工具
    开通园子
    iOS拓展---(APP)进程间常用通信方式总结
  • 原文地址:https://www.cnblogs.com/yehshuai/p/4260339.html
Copyright © 2011-2022 走看看