For programmers, testers and tech geeks

Extjs, use function in tpl , in gridPanel's templateColumn

{
           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.