Ext2.0 renderer传值

{header:'描述',renderer: renderDescn }
function renderDescn(value, cellmeta, record, rowIndex, columnIndex, store) {
var str = "<input type='button' value='查看详细信息' onclick='alert(/"" +
"这个单元格的值是:" + value + "//n" +
"这个单元格的配置是:{cellId:" + cellmeta.cellId + ",id:" + cellmeta.id + ",css:" + cellmeta.css + "}//n" +
"这个单元格对应行的record是:" + record + ",一行的数据都在里边//n" +
"这是第" + rowIndex + "行//n" +"这是第" + columnIndex + "列//n" +
"这个表格对应的Ext.data.Store在这里:" + store + ",随便用吧。" +"/")'>";
return str;
}

----------------------------------------------------------------------------------------

{header: "图片操作",dataIndex: 'Edit',width:60,renderer:function(value,cellmeta,record, rowIndex){
     var contentId = Ext.id();
     var btn = createGridButton.defer(1, this, [contentId]);
     function createGridButton(){
       return new Ext.Button({
         text:'dddd',
         iconCls:'addItem',
         handler: function(){
            alert(rowIndex);
         }
        }).render(document.body, contentId);
     }
     return('<div id="'+contentId+'"/>'); 
    }
}

你可能感兴趣的:(Ext2.0 renderer传值)