jqgrid 表格列格式化

 

{
   label: '操作', name: 'Status', width: 100,frozen: true, sortable: false, formatter: function (cellvalue, options, rowObject) {
       var arrayOpe = [];
       arrayOpe.push("<span class=\"label label-success\" onclick=\"CoreConfigListJs._edit('" + rowObject.ID + "')\" >修改</span>");
       return arrayOpe.join(" ");
    }
},
  { label: '创建时间', name: 'Createtime', width: 125,formatter: "date", formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s' }  },
{name:'id',     index:'id',     formatter:  customFmatter},  
//定义方法
function customFmatter(cellvalue, options, rowObject){  
    console.log(cellvalue);  
    console.log(options);  
    console.log(rowObject);  
    return "["+cellvalue+"]";  
};  

 

posted @ 2019-08-06 11:00  花影疏帘  阅读(370)  评论(0)    收藏  举报