PDA

View Full Version : Pass a value to RowExpander template



sanjshah
3 Nov 2009, 3:26 PM
Hi,

I'm trying pass a value to a



var expander = new xg.RowExpander({
tpl : new Ext.Template(
'&nbsp;<b>Comments:</b>&nbsp;{desc}<br><br>'
)
});


but I would like to get the value of relative dataindex (status) and use an if/else statement to change the template,

i.e.



var expander = new xg.RowExpander({
statusval = getAt(index).get('status');
if statusval == 'N' then
tpl : new Ext.Template(
'&nbsp;<b>THIS IS A TEMP COMMENT</b>&nbsp;{desc}<br><br>'
)
else
tpl : new Ext.Template(
'&nbsp;<b>Comments:</b>&nbsp;{desc}<br><br>'
)
});


Is this possible?

Thanks

sanjshah
9 Nov 2009, 1:43 AM
Apologies but is this possible?