PDA

View Full Version : Images not displaying in a grid cell after reload



srk_kiran
2 Feb 2010, 4:04 AM
I tried to display the images in the grid cell using templatecolumn. First time the images are displayed properly, but when i try to reload the grid or navigate between the pages using paging toolbar, the images are lost. I owuld aprreciate if any one came across such issue and shed some light on this as i'm struggling from couple of hours or more.
Thanks in advance...

Please find the below snippet used:



this.paging = new Ext.PagingToolbar(
store : this.getStore(),
pageSize : 50,
listeners : {
scope : this,
beforechange : function(paging, params) {
this.getStore().setBaseParam('viewHandle',
this.params.viewHandle);
}
});

//Return grid component so that it is added to the parent container of border layout
// in the west region
id : 'docsList',
xtype : 'grid',
itemId : 'list',
columns : [{
xtype : 'templatecolumn',
tpl : new Ext.XTemplate('<div><tpl for="tagList"><img style="background-color: {displayValue}" src="images/icons/drtag_white.png" /></tpl></div>'),
header : 'Tags',
dataIndex : 'tagList',
width : 0.25
}, {
header : 'Documents',
xtype : 'templatecolumn',
tpl : new Ext.XTemplate('<img src=\'images/gridIcon-{ecaDocumentType}.png\' height=13 width=13 border=0 style=\'padding-right:5px\' />{name}'),
dataIndex : 'name',
width : 0.75
}],
store : this.getStore(),
bbar : this.paging,
viewConfig : {
forceFit : true,
emptyText : 'No documents'
},
autoExpandColumn : 'name',
autoScroll : true,
sm : new Ext.grid.RowSelectionModel({
singleSelect : true
})
};

// for Reloading the grid on some button action
Ext.getCmp('docsList').store.reload();

srk_kiran
8 Feb 2010, 11:52 PM
Is any one there really helping out..