PDA

View Full Version : Pass additional values into a custom renderer



venomizer
17 Aug 2009, 2:16 AM
Hi all,

Hoping there is a simple answer to this one.

I have a custom renderer for one of the columns in my GridPanel. At the moment, the function of that renderer only gets passed the value of the each cell in that column.

How can I pass the value of another cell from a different column but on the same row to use in that function?

Thanks

BitPoet
17 Aug 2009, 3:42 AM
Read the documentation of the ColumnModel's setRenderer (http://extjs.com/deploy/ext-3.0.0/docs/?class=Ext.grid.ColumnModel&member=setRenderer) method. Among the parameters passed to the renderer function is also the row's data record.

Animal
17 Aug 2009, 4:53 AM
Hi all,

Hoping there is a simple answer to this one.

I have a custom renderer for one of the columns in my GridPanel. At the moment, the function of that renderer only gets passed the value of the each cell in that column.



Sure about that? Can you cite an API doc page which tells you this?

venomizer
17 Aug 2009, 5:20 AM
Thanks, I see this now. I wasn't calling all of the parameters avaliable to me.