zoukankan      html  css  js  c++  java
  • extjs 获取grid所有行,获取store行字段数据,合计

    1. extjs 获取grid所有行
      var grid = filed.findParentByType('panel');
      var rows =  grid.store.getData().items;
      

        

    2. 获取store行字段数据
      store.getAt(0).get('finalAmount');
      

        

    3. 合计
      features: [{
              ftype: 'summary',//计算公式行
              dock: 'bottom'//至于底部合计
          }],
      	sunmmaryType:'sum' //页面计算
      	summaryRenderer: function (value) {//行数据
                      return this.getView().store.data.items[0].data.sumAmount
                  }
      

        

    4. Extjs actioncolumn动态显示按钮
      通过getClass方法可以获取到,当前行的数据,根据指定字段的值可以判断设置按钮的显示或隐藏。
      {
          text: '操作',  xtype: 'actioncolumn', align: 'center', menuDisabled:true, flex:0.5, items:[{
              tooltip: '查询',
              getClass : function (v, metadata, r, rowIndex, colIndex, store) {
                  if(recValid == 'N'){
                      return 'x-hidden';
                  }
                  var data = r.raw.matchFlag;
                  if(data== "PMIS"){
                      return 'x-hidden';
                  }
                  return "doc_lines";
              }
          }]
      }
      

        

  • 相关阅读:
    随机数模块(random)
    时间模块(time)
    collection模块 1
    collection模块
    re模块
    正则
    Bootstrap 关于下拉菜单的使用
    Bootstrap 关于Glyphicons 字体图标的使用
    oracle拼音排序
    ajax缓存问题
  • 原文地址:https://www.cnblogs.com/cg-take/p/13100411.html
Copyright © 2011-2022 走看看