-
21 Aug 2011 4:26 AM #1
Answered: TreeGrid column template
Answered: TreeGrid column template
Hi!
I'm using the ExtJs4 TreeGrid component. The example suggests using XTemplates to render columns:
Problem is, i need to pass more than one value to the function. In my case not only duration but also another member from the values object ("id"). How do i do that?Code:tpl: Ext.create('Ext.XTemplate', '{duration:this.formatDuration}', { formatDuration: function(v) { })
In ExtJs3 ux.TreeGrid it was possible to use something like this:
Inside this function one was able to access all members of the values object simply by using this.membername. Inside ExtJs4 XTemplate this points to the XTemplate itself.Code:tpl : function(a) {}
thx,
kr kerthi
-
Best Answer Posted by kerthi
This seems to do the trick:
Code:tpl: Ext.create('Ext.XTemplate', '{[this.formatDuration(values.duration,values.id)]}', { formatDuration: function(v,i) { })
-
21 Aug 2011 4:37 AM #2
This seems to do the trick:
Code:tpl: Ext.create('Ext.XTemplate', '{[this.formatDuration(values.duration,values.id)]}', { formatDuration: function(v,i) { })


Reply With Quote