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()
                        }
                    });
                }
            })
        });
  • 相关阅读:
    html页面自适应宽度
    Angularjs Select获取数组下标
    spring boot集成mybatis分页插件
    百度分享实现https
    nginx自定义错误页面
    nginx代理tomcat
    Nginx配置SSL证书
    Nginx安装
    xmlns:amq="http://activemq.apache.org/schema/core"报错
    ActiveMQ
  • 原文地址:https://www.cnblogs.com/yehshuai/p/4260339.html
Copyright © 2011-2022 走看看