从服务端获取到数据后,grid的该列值是0,或1,或-1;
在ext展现时,需要将grid的该列展现分别对应为“审核中”,“通过”,“未通过”,ext应该如何实现呢?
希望有此经验的GS们帮忙。。。。谢谢!
列模型
var cm = new Ext.grid.ColumnModel([
{header:'你说的这 列',dataIndex:'yourcm',,renderer:renderFun},//加渲染函数
]);
function renderFun(value) {
if(value==0){
return "审核中"
}else if(value==1){
return "通过"
}else{
return "未通过"
}
}