olagunnarsson
27 Jan 2011, 4:35 AM
Hi,
I would like to make an Ext.Template, where the style {css} should depend on the {value}.
For example if the {value} exceeds 5 the output will be red otherwise black.
this.cellTpl = new Ext.Template(
'<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}">',
'<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on">{value}</div>',
"</td>"
);...the example above is from the Ext.ux.GroupSummary and it is also there I would like to change the template as I explained.
Does anyone have any suggestions on how to do this?
Thanks in advance.
//Ola
I would like to make an Ext.Template, where the style {css} should depend on the {value}.
For example if the {value} exceeds 5 the output will be red otherwise black.
this.cellTpl = new Ext.Template(
'<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}">',
'<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on">{value}</div>',
"</td>"
);...the example above is from the Ext.ux.GroupSummary and it is also there I would like to change the template as I explained.
Does anyone have any suggestions on how to do this?
Thanks in advance.
//Ola