PDA

View Full Version : Ext.ux.grid.BufferView and actioncolumn custom renderer



stjepano
9 Jan 2013, 5:19 AM
Did not know where to submit this so I opened new thread.

I tried to use BufferView (downloaded from ExtJS 3.4 examples) with actioncolumn(s) custom renderer and got error this.items is undefined:


{
xtype: 'grid',
view: new Ext.ux.grid.BufferView({
// ...
},
// ...
columns: [
// ...
{
xtype: 'actioncolumn',
//...
renderer: function(value, metaData, record, rowIndex, colIndex, store){
// ERROR: does not work because this.items is undefined
this.items[0].tooltip = 'Tantijemi po izvorima';
this.items[0].icon = 'img/information.png';
},
//...
}
// ...
]
// ...
}


problem lies in Ext.ux.grid.BufferView doRender method,
you should change line:

p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds);
to:

p.value = c.renderer.call( c.scope, r.data[c.name], p, r, rowIndex, i, ds );

mitchellsimoens
11 Jan 2013, 1:06 PM
Moved to the help forum as you are asking for help not showcasing something.