View Full Version : YAHOO.ext.grid.DefaultColumnModel's renderer problem

6 Feb 2007, 8:54 PM

First of all I would like to thank you all for helping starters like me to sort issues regarding YUI-ext.

Great forum Jack

I am facing a problem
I have two columns File and Name with renderer fileClassIcon and name. Icon to be used in
renderer fileClassIcon() is based on value in corresponding Name column.

How can I access Name column value in fileClassIcon(value) function for same row so that I can check value in Name column and based on that value set icon or image in File column for that row

var colModel = new YAHOO.ext.grid.DefaultColumnModel([
{header: "File", width: 10,hidden:true, sortable: true,renderer: fileClassIcon},
{header: "Name", width: 120, sortable: true,renderer: name}

function fileClassIcon(value){


function name(name) {

Thanks :)

6 Feb 2007, 9:22 PM
This functionality isn't in the .33 code, but it was added to the code in SVN. You could use that or just override the updateCell method in .33 to pass the datamodel as an additional arg to the renderer fn.