-
26 Jan 2009 8:39 AM #131
Thanks wayne_o, I am facing a problem with the GroupSummary. I don't if you can help but this is my problem: I have a column set as string so I can return multiple dollard amounts like this: 60.00~26.25. and I parse this text when I render the column.
So this works, one row with multiline amount. The result is:Code:{ header: 'Group/RC-Amt',dataIndex: 'AdjustmentMonetaryAmount', renderer: function(v, params, record){ var str; if(!String.IsNullOrEmpty(record.data.AdjustmentMonetaryAmount)) { if (record.data.AdjustmentMonetaryAmount.indexOf("~")>=0) { var col_array = record.data.AdjustmentMonetaryAmount.split("~"); for (i=0;i<=col_array.length-1;i++) { col_array[i] = Ext.util.Format.usMoney(col_array[i]) + '<br/>'; } str = col_array.join(""); } else { str = Ext.util.Format.usMoney(record.data.AdjustmentMonetaryAmount); } } return str; }, summaryType:'GrpAmt' }
$60.00
$26.25
Great. But when it comes to the summary I do this:
I tried every possible combination and I still get $Nan.00 no matter what I do. But the funny thing when I view the variables, they hold the right totals and yet, they can't be shown on the grid. I suspect this to happen because the record in the reader is declared as this:Code:Ext.grid.GroupSummary.Calculations['GrpAmt'] = function(v, record, field){ var sum; if(!String.IsNullOrEmpty(record.data.AdjustmentMonetaryAmount)) { if (record.data.AdjustmentMonetaryAmount.indexOf("~")>=0) { var col_array = record.data.AdjustmentMonetaryAmount.split("~"); var sum = parseFloat(col_array[0]); for (i=1;i<=col_array.length-1;i++) { sum = sum + (parseFloat(col_array[i])); } alert(sum); } else { sum = record.data.AdjustmentMonetaryAmount; } } return Ext.util.Format.usMoney(sum.toString()); }
Code:{name: 'AdjustmentMonetaryAmount', type: 'string', mapping: 'AdjustmentMonetaryAmount'},
Any help would be greatly appreciated.
Thanks
-
27 Jan 2009 4:08 PM #132
I found out that removing Ext.util.Format.usMoney fixed my problem because the field has a string type.
I am still looking for something like the rowExpander plugin but it has to be for the grouped items not per row.Code:return Ext.util.Format.usMoney(sum.toString());
In another words, I I will display additional text below the totals (GroupSummary) as one row and not per cell.
Any help will be appreciated.
Thanks
-
27 Jan 2009 11:24 PM #133
-
28 Jan 2009 2:10 AM #134
Multigrouping with sumamries etc
Multigrouping with sumamries etc
Here you go...
All of the related extensions - as they are in my system.
It'd be great if we could develop this plugin/set of plugins as they provide EXCELLENT - near as damn it - ad hoc reporting!!
[please rename the file to UploadToExt.rar before extracting
]
w://
-
28 Jan 2009 2:12 AM #135
-
28 Jan 2009 9:06 AM #136
I hear you bro, I found out the hard way. wayne_o do you happen to know how to add a group expander that takes up the whole row?
-
17 Feb 2009 3:12 AM #137
Recently, I have started using this MultiGrouping Grid. However I get an error - "Ext.ux.clone is not a function" in FireFox ..Please advise...
-
17 Feb 2009 3:39 AM #138
Please make sure you have the deepclone function included in your scripts

http://jaffa.cvs.sourceforge.net/vie...xtjs/ux/utils/
w://
-
17 Feb 2009 3:40 AM #139
Sorry for late replying...
What do you mean about having the expander take up the whole row? My version - if I click anywhere on the expander row - it expands/contracts the group.
W://
-
17 Feb 2009 5:51 AM #140
I have included the DeepClone file...but Still no luck :-( I get error - "Labels is not defined" .... I am using it as per instructions on http://www.jadacosta.es/extjs/exampl...ultiGroup.html Please let me know if I am still missing any files to include.


Reply With Quote