PDA

View Full Version : Image in the action column of the grid is not displaying



lucrativeu
13 Mar 2013, 11:58 PM
I'm having difficulty in displaying the image of an actioncolumn in a grid. Below is the snippet of the code

Ext.define('App.view.LabelForm', {
extend:'Ext.window.Window',
alias: 'widget.newLabelForm',
id:'labelFormWindow',
title : 'Labels',
modal : true,
tools:[{
type:'help',
tooltip:'Help'
}],
layout:'vbox',
width: 350,
items:[
{
xtype:'grid',
id:'labelFormGrid',
width:'100%',
height:200,
store:'LabelManager',
autoDestroy:false,
columns: [
{
dataIndex: 'id',
hidden: true
},{
dataIndex: 'labelName',
text: 'Available Labels',
flex : 1
},{
menuDisabled: true,
sortable: false,
xtype: 'actioncolumn',
width: 50,
iconCls : 'delete', // Use a URL in the icon config
tooltip: 'Delete'
}
],
.
Your contribution will be highly appreciated

Farish
14 Mar 2013, 5:44 AM
you may use the icon config (in place of iconCls) in the actioncolumn and give it the URL to the image you want to show:


http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.column.Action-cfg-icon

RicMBM
30 Mar 2017, 8:07 AM
if Sencha doesn't find that image in its folder, it will send an empty space