Discuss anything related to web development but no technical support questions


Post by mats »

Hm, yes this is certainly a quite advanced case though solvable. You would have to override the internalRenderer method to handle your case to return some icon HTML blob for your cells. Slighty tricky but possible :)

Post by xjpmauricio »

mats wrote:Hm, yes this is certainly a quite advanced case though solvable. You would have to override the internalRenderer method to handle your case to return some icon HTML blob for your cells. Slighty tricky but possible :)
...any hints on doing that? :mrgreen:

...i could look at the scheduler source of course...

Post by mats »

Yup, you'll have to look at the internalRenderer source, only way to do it :)

Post by Albareto »

I had also to override a column renderer for specific columns in grids, maybe this can help you:
function colorRenderer (value, metaData, record, rowIndex, colIndex, stor)
{
	var table = cachedTemplate('<div width="100%" style="background-color:#{color}"><table><tr><td>{value}</td></tr></table></div>');
	return table.apply({color: value.color, value: value.value});
}


You would have to change it to something like
function imageRenderer(value, metaData, record, rowIndex, colIndex, stor)
{
	var table = cachedTemplate('<div width="100%" ><img src="{source}" alt="{alt}" onclick="{function}" /></div>');
	return table.apply( value: value.source, alt: value.alt, function: value.function});
}
And set this renderer to your column's, it will be handled the same for all the elements in your column.

Is this what you (both) were talking about? Sometimes I get a bit lost xD

BTW, nice customers that want nice things, eh? ;)

Post Reply