{
header : "跟踪物流",
align : "center",
width : 100,
menuDisabled : true,
sortable : false,
renderer : function (value, cellmeta, record, rowIndex, columnIndex, store) {
//拿到当前物流单号
var id = record.data['id'];//在此处你可以拿到当前store中任何数据
return "<a href='javascript:void(0)' color = 'blue' onclick='getLogisInfo(" + id +")'>跟踪物流</a>"
//如果添加按钮可以这样
// return "<input type='button' value='跟踪物流' onclick='getLogisInfo("+trackingid+")'>"
},
}
function getLogisInfo(id) {//做自己的处理}
renderer:function(value, cellmeta, record, rowIndex, columnIndex, store){}
说明:
value:将要像是单元格里的值,即dataIndex的值
cellmeta:单元格的相关属性,主要是id和CSS
record:这行的数据对象,通过record.data[‘id’]方式得到其他列的值
rowIndex:行号
columnIndex:当前列的行号
store:构造表格时传递的ds,也就是说,表格里所有的数据都可以通过store获得,这个比较强大