Hello Team,


I am trying to add button on grid column cell using column renderer, but i am getting this error in console while adding button in grid cell
Uncaught TypeError: Cannot read property 'dom' of null.


below is code snippet


{
xtype: 'gridcolumn',
dataIndex: 'customerID',
text: 'Customer ID',
renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
var id = Ext.id();
Ext.defer(function() {
new Ext.Button({
text : 'Modify',
renderTo:id,
handler : function(btn, e) {
}
}); // .render(Ext.getBody(),id);
}, 50);
return value + '<br>' + '<span id="' + id + '"></span>';
}
},

if i uncomment above line that its work fine, but than button got added two times in grid cell as well as below the screen ,

Can you please provide some solution ?


Thanks
Pratik