Using the getClass
function to display icons in the action column:
{
xtype: 'actioncolumn',
id:'actionColumnGridUsers',
width: 30,
hideable: false,
items: ['->',
{
getClass: function (v, meta, rec)
{
if (rec.get('nameUser') != '') return 'icon-edit';
else return 'icon-add';
}
}
}
Here is the corresponding CSS code:
.icon-add { background-image: url("../images/add.png"); }
.icon-edit { background-image: url("../images/edit.png"); }
The code appears to be correct, but for some reason, the icon is not being displayed. What could I be overlooking?