ext grid button

function setGrid() {
var cm = new Ext.grid.ColumnModel([   
{header:'ID',dataIndex:'id',hidden:true},
{header:'名',dataIndex:'title'},
{header:'sort',dataIndex:'fileComment'},
{header:'登陆者',dataIndex:'wfWaitUserName'},
{header:'所属',dataIndex:'wfWaitSecName'},
{header:'开始日',dataIndex:'wfCreateDate'}
{
header : "操作",
width : 150,
dataIndex : 'operation',
align : 'center',
renderer : function(value, cellmeta, record, rowIndex, columnIndex,store) {
 if (this.findField("id").getValue() == "0") {   
                     
                return "<button type='button' onclick='rMenu1Fn'>触发</button>" 
}

if(this.findField("id").getValue() == "1") {
 return "<button type='button' onclick='rMenu1Fn'>催发</button>" 


}

if(this.findField("id").getValue() == "1") {
 return "<button type='button' onclick='rMenu1Fn'>提交</button>" 


}]); 

你可能感兴趣的:(ext)