PDA

View Full Version : display images into grid column



soung
4 May 2011, 3:20 PM
hello everybody
I want to define for each column in a grid a renderer
but I have an empty grid.
here the code:


for(var index=0,i=viewRas.debutSemaineCourante;i.between(viewRas.debutSemaineCourante,finSemaineCourante);i=i.add(Date.DAY,1),index++)
{
viewRas.gridJour.getColumnModel().setRenderer(index, function(val, metadata, record, rowIndex, colIndex, gridStore)
{
return viewRas.tabContenuGridJour[i.format("l")];
});
}
where
viewRas is a javasript object (class)
tabContenuGridJour an associative array(keys are string)
debutSemaineCourante, finSemaineCourante and i are date.


the table tabContenuGridJour contains html tags <img>.
I would like to display these images in the grid column.

what's wrong with this code?

could i display images in the columns of my grid otherwise? (without going through the columns of tpl)

if so how?

thank you.