{
header: '',
xtype: 'templatecolumn',
tpl: ['<div>' +
'<div>' +
'<tpl for="data">' +
'<tpl if="Title.length > 0">'+
'<div>{Title}</div>' +
'</tpl>' +
'<div>{[this.shorten(values.fullName)]}</div>' +
'</tpl>' +
'</div>'
, {
shorten: function (noOfTimes) {
return noOfTimes;
}
}],
},
That's how we can use functions in tpl.
header: '',
xtype: 'templatecolumn',
tpl: ['<div>' +
'<div>' +
'<tpl for="data">' +
'<tpl if="Title.length > 0">'+
'<div>{Title}</div>' +
'</tpl>' +
'<div>{[this.shorten(values.fullName)]}</div>' +
'</tpl>' +
'</div>'
, {
shorten: function (noOfTimes) {
return noOfTimes;
}
}],
},
That's how we can use functions in tpl.
No comments:
Post a Comment