PDA

View Full Version : Function in "groupTextTpl"



Tinki
23 Jun 2009, 12:35 AM
Is it possible to insert a function into groupTextTpl? I want it look like this:



function countTotal(records){
var totalSum = 0;
for (i=0;i<records.length;i++){
totalSum += records[i].get('docAmount');
}
return totalSum;
}
............
groupTextTpl: '{gvalue}, bla-bla-bla: {[countTotal(values.rs)]}'
............


Just need an asumming value in the header of the row.