tag:blogger.com,1999:blog-1245414118611676168.post5460848174195470543..comments2023-11-02T01:50:46.341-07:00Comments on Pearls of Flex: Customizing grouping using GroupingField.groupingFunction in GroupingCollectionSreenivashttp://www.blogger.com/profile/17636694169757371801noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-1245414118611676168.post-80717760199546158622009-12-23T15:35:23.431-08:002009-12-23T15:35:23.431-08:00Hi, Sreenivas,
My new problem... My ADG is working...Hi, Sreenivas,<br />My new problem... My ADG is working, but I have a slider with a range of values away of ADG. When I set these values I want the Summary row in ADG is filter, only showing totals between this range. Can you help me, please?<br /><br />Thank you again<br /><br />RobertoRobertohttps://www.blogger.com/profile/16921933397968378342noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-68971005510191252562009-08-05T06:23:46.259-07:002009-08-05T06:23:46.259-07:00The way to get sorting to work with grouping colle...The way to get sorting to work with grouping collection is to group on the field required and then apply sort to adg directly.<br /><br /> gc.refresh(); <br />var view:HierarchicalCollectionView = adg.dataProvider as HierarchicalCollectionView;<br />var mySort:Sort = new Sort();<br />var fields:Array = [ new SortField("food") ];<br /> mySort.fields = fields;<br />view.sort = mySort;<br />view.refresh();Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-57107491777373910412009-05-05T08:15:00.000-07:002009-05-05T08:15:00.000-07:00Forgot to mention that I don't want to use 2 group...Forgot to mention that I don't want to use 2 groupingfields because that would affect the appearance of the AdvancedDataGrid. I want only 1 groupingfield to be visible and sort by the other fields.Unknownhttps://www.blogger.com/profile/07251343123985881309noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-41027519184220382322009-05-05T08:02:00.000-07:002009-05-05T08:02:00.000-07:00Sreenivas, suppose I have a data source that conta...Sreenivas, suppose I have a data source that contains two fields: name and food.<br /><br />The data (sorted by name, food) looks like:<br />Adam Bigmac<br />Adam Hotdog<br />Helen Bigmac<br />Helen Candybar<br />Helen Hotdog<br /><br />I want to group it by name and then, within each group, sort by food. I.e., I want to preserve the sort order.<br /><br />But after grouping by name, the food loses its sort order. How can I manage to retain the sort order?Unknownhttps://www.blogger.com/profile/07251343123985881309noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-34780161214095467402009-02-17T23:21:00.000-08:002009-02-17T23:21:00.000-08:00Hi Sreenivas,Can u add an extra row at the end whi...Hi Sreenivas,<BR/><BR/>Can u add an extra row at the end which will display total of counts <BR/>whithout removing grouping?<BR/><BR/>like<BR/><BR/>Age Count<BR/>Total 20Unknownhttps://www.blogger.com/profile/06060094590050697076noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-21874061610591071422009-01-13T05:07:00.000-08:002009-01-13T05:07:00.000-08:00Nothing can be done in that case as the unsorted o...Nothing can be done in that case as the unsorted order cannot be restored in any fashion.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-79181813883594960002009-01-13T05:04:00.000-08:002009-01-13T05:04:00.000-08:00Thanks for your reply. Yes. It should be unsorted....Thanks for your reply. Yes. It should be unsorted. I just have to follow the XML order. for that what should i do?Flamingohttps://www.blogger.com/profile/14280510574182065924noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-3064634663332676042009-01-13T04:24:00.000-08:002009-01-13T04:24:00.000-08:00I don't know what you mean by keep the original so...I don't know what you mean by keep the original sorting of XML data you have. Doest it mean it can be even unsorted ?<BR/><BR/>It is necessary to sort the data for grouping without which it is not possible to group reliably.<BR/><BR/>If you very much want to keep the original sorting order assuming you know what it was (other than unsorted) you have to re-apply the sorting to the ADG.dataProvider.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-27897708429494384862009-01-13T02:06:00.000-08:002009-01-13T02:06:00.000-08:00How to remove the default sort applied to the grou...How to remove the default sort applied to the grouped column? I want to get rid of it and keep the original sorting of my XML. <BR/>somewhere i read "compareFunction" could do it....would you post an example for this function please?<BR/>thank youFlamingohttps://www.blogger.com/profile/14280510574182065924noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-18735730593809884512008-06-11T16:48:00.000-07:002008-06-11T16:48:00.000-07:00Thanks, It seems I had forgetten a compare functi...Thanks, It seems I had forgetten a compare function. It works now.Unknownhttps://www.blogger.com/profile/00552435917838606825noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-22874925922838049172008-06-09T21:24:00.000-07:002008-06-09T21:24:00.000-07:00I had posted a date grouping similar to Outlook he...I had posted a date grouping similar to Outlook <A HREF="http://flexpearls.blogspot.com/2008/02/groupingcollection-to-group-mails-on.html" REL="nofollow">here</A>.<BR/><BR/>See if that helps.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-46009323722549813282008-06-09T11:25:00.000-07:002008-06-09T11:25:00.000-07:00Hi,I am interested if this method can be reproduce...Hi,<BR/><BR/>I am interested if this method can be reproduced with date ranges. I tried the following groupingFunction and it did not work so well.....<BR/><BR/>private function monthlyFunction(data:Object, field:GroupingField):String<BR/> {<BR/> var newDate:Date = data[field.name] as Date;<BR/> var dateLower:Date = new Date(newDate.getFullYear(), newDate.getMonth(), 1);<BR/> var dateHigher:Date = new Date(newDate.getFullYear(), newDate.getMonth() + 1, 1);<BR/> <BR/> return Number(dateLower).toString()+"-"+Number(dateHigher).toString();<BR/> //return DataFormatters.MONTHS[newDate.getMonth()] + newDate.getFullYear().toString()+ "-" + DataFormatters.MONTHS[newDate.getMonth() + 1] + newDate.getFullYear().toString();<BR/> }<BR/><BR/>Any thoughts?Unknownhttps://www.blogger.com/profile/00552435917838606825noreply@blogger.com