Below is my code to create an download link in a everycell of a particular column. This is working fine too.. But in the below code that i used it allows only Icon for the download link. Can anyone please help me how to create a button instead of icon for every cells of the column.
this.columns = [ {
text : 'documentName',
dataIndex : 'documentName',
flex : 1.5,
sortable : true
}, {
text : 'documentDescription',
dataIndex : 'documentDescription',
flex : 2.5,
sortable : true
},
{ text : 'downloadLink',,
xtype:'actioncolumn',
flex : 0.5,
items: [{
icon: 'staticfiles/download.png', // Use a URL in the icon config
iconCls:'downloadHelpDocIcon',
tooltip: 'Download',
handler: function(grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
//alert("Edit " + rec.get('downloadLink'));
}
}]
}
Just add a button to the items array:
text: 'column2',
dataIndex: 'column2',
items: [{
xtype: 'button',
text: 'click',
...
}]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.