博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Ext renderer参数详解
阅读量:7099 次
发布时间:2019-06-28

本文共 1609 字,大约阅读时间需要 5 分钟。

hot3.png

1、renderer参数介绍

renderer: function (value, cellmeta, record, rowIndex, columnIndex, store)

--> 

value是单元格的值

cellmeta单元格的配置:cellmeta.cellId、cellmeta.id、cellmeta.css

record是单元格对应行的record

rowIndex是单元格的行数

columnIndex是单元格的列数

store是表格对应的Ext.data.Store

2、renderer常用写法

//列表 跳转 查看页面

function hrefRender(value, cellmeta, record, rowIndex, columnIndex, store){

   var uuid = record.get("uuid");
     return '<a href="'+contextPath+'/messageCenterManagerAction.do?method=getObj&view=view&uuid='+uuid+'">'+value+'</a>';
  }

 

//建立时间

 function dateRender(value, cellmeta, record, rowIndex, columnIndex, store){
     if(value && 'NaN' != value){
      return value.substring(0,10);
     }else{
      return '';
     }
  }
 //日期处理
 function dateRender(value, cellmeta, record, rowIndex, columnIndex, store){
      try{
         var a = value.substring(0,10);
         return Date.parseDate(a,"Y-m-d").format('Y-m-d');
        }
        catch(e){
         return '';
        }
  } 

 

//日期处理

 function dateRender(value, cellmeta, record, rowIndex, columnIndex, store){
     try{
         var a = value.substring(0,10);
         return Date.parseDate(a,"Y-m-d").format('Y年m月d日');
        }
        catch(e){
         return '';
        }
 }

 

{header: "程度", width: 60, dataIndex: 'urgentName',sortable: false},

  store.on('load',function (store,records,options){
   for(var i=0;i<records.length;i++){
     var record= store.getAt(i);
     aacc(record);
   }
  });
  
    function aacc(re){
    if(re.data['urgentId']!=''){
      Ext.Ajax.request({
      ],
      method:'POST',
      callback:function(options,success,response){
       var data = response.responseXML;
       var urgentName='';
        if($(data).text()!=''){
         urgentName = $(data).find("urgentName").text();
        re.set('urgentName',urgentName);
        }
      }
     }
    );
    }
  }

转载于:https://my.oschina.net/softwarechina/blog/161195

你可能感兴趣的文章
Palindrome Pairs
查看>>
项目测试随笔
查看>>
poj3261 -- Milk Patterns
查看>>
HttpClient获取返回类型为JSON或XML的数据
查看>>
python 自动化对比返回结果
查看>>
SQLite分页语句
查看>>
cesiumjs开发实践(六) CZML
查看>>
Delphi窗体中禁用最大化按钮
查看>>
K均值
查看>>
基于FPGA的dds发生器与lcd显示参数
查看>>
HDU-6216 A Cubic number and A Cubic Number [二分]
查看>>
php单例模式的使用场景,使用方法
查看>>
fetch请求get方式以及post提交参数为formdata类型的数据
查看>>
[学习笔记]凸优化/WQS二分/带权二分
查看>>
CentOS 下 LVS集群( 可能更新 )
查看>>
差分信号(Differential Signal)
查看>>
Aix项目_shell_rsh_01
查看>>
第216天:Angular---自定义指令(二)
查看>>
“省考”最热职位230人抢一个
查看>>
bzoj 4823 [Cqoi2017]老C的方块——网络流
查看>>