PDA

View Full Version : ColumnTree renderer for component



mikegiddens
12 Aug 2009, 6:56 AM
I have looked through a lot through in the forum but was not able to find a simple way to bind a ext component to a tree column.

I was hoping someone could tell me how to bind the new object as the return element and have it shown.

The goal was to have rating stars next to each tree node of a certain type.



, columns:[{
header:' '
, width:230
, dataIndex:'task'
},{
header:' '
, width:100
, dataIndex:'duration'
},{
header: ' '
, width:100
, dataIndex:'user'

, renderer: function(a, b, c) {

console.log(a, b, c);
switch( c.ddGroup ) {
case 'element':
star = new Ext.form.StarRate({
xtype:'xstarrate',
hiddenName: 'rate',
hiddenValue: 1,
autoShow: true,
starConfig: {
minValue: 0,
maxValue: 5
}
});
console.log(star);
return('Stars Here');
break;
default:
return('');
}
}

}]