tag:blogger.com,1999:blog-1245414118611676168.post3417417718310406762..comments2023-11-02T01:50:46.341-07:00Comments on Pearls of Flex: AdvancedDataGrid performance pollSreenivashttp://www.blogger.com/profile/17636694169757371801noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-1245414118611676168.post-30690065545749600592011-08-09T08:39:47.171-07:002011-08-09T08:39:47.171-07:00Hi Sreenivas,
Hope you are doing well.
I am conf...Hi Sreenivas,<br /><br />Hope you are doing well.<br /><br />I am confused about ADG performance.<br />I have used ADG in my application.<br />ADG columns are created and added at runtime and also set ADGRenderer at runtime while columns are creating.<br /><br />It is created very perfectly.<br />But problems occurs while data initialized to ADG dataprovider HierarchicalData variable.<br />Suddenly ADG performance going too slow.<br /><br />ADG dataprovider having huge data.<br /><br />any idea what going wrong with my app.?Unknownhttps://www.blogger.com/profile/06339403768608522986noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-61023333054997033842011-06-15T23:16:46.139-07:002011-06-15T23:16:46.139-07:00Can you send me a sample project showing this prob...Can you send me a sample project showing this problem ?Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-76806444527482791482011-06-15T21:47:58.948-07:002011-06-15T21:47:58.948-07:00Hoping you can help. I have an advanced datagrid ...Hoping you can help. I have an advanced datagrid with 12 columns. Every column and every row has an item renderer on it and the data is selectable. I need all this functionality because we are selecting text and providing an in-context menu based on what they select. When we apply the item renderer (even a custom one with nothing in it) the scroll bars become so slow we can't use the DG at all. The ADvDG flows off the screen to the right and below. The number of rows don't seem to make any difference....<br /><br />any ideas?Anonymoushttps://www.blogger.com/profile/09530247997603518293noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-24720053207258689052010-11-30T01:54:58.499-08:002010-11-30T01:54:58.499-08:00Hi Sreenivas,
Objective:
To show data from the ba...Hi Sreenivas,<br /><br />Objective:<br />To show data from the backend in a grid, depending on the data.<br /><br />Issue:<br />Vertical scrolling is very slow. Experiencing this proble at 40 rows. At times the row size goes upto a 1000 rows.<br /><br />Case study:<br />I am using the ADG for this purpose, and I also have to deal with having the "variableRowHeight=true".<br /><br />The difficulty is that the ADG is created in the mxml, but the columns and data and then the column renderers for the data are created dynamically from the received backend object (this holds information like the number of columns for the grid, their names, data for the grid and stuff).<br /><br />So these are the steps that are taken:<br />1. Create the ArrayCollection for the data provider.<br />2. Create the columns, as metioned by the backend object.<br />3. Set the columns array to ADG.columns.<br />4. Iterate through the first row, to set the item renderers for the columns and their widths.<br />5. Set the renderers Array to the ADG.rendererProviders Array.<br /><br />The mxml tag:<br />"<"controls:AutoSizingAdvancedDataGrid id="dg" sortableColumns="false" showHeaders="true"<br />dataProvider="{dgDP}" sortExpertMode="true"<br />selectable="false" variableRowHeight="true"<br />width="840" styleName="subTaskDG" maxHeight="1000"<br />draggableColumns="false" wordWrap="true" "/>"<br /><br /><br />Any help on this matter is solicited. I can provide more information if required.<br /><br />Thanks.perflexed developerhttps://www.blogger.com/profile/06562408639857773130noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-80332019247428441122010-11-30T01:53:55.138-08:002010-11-30T01:53:55.138-08:00This comment has been removed by the author.perflexed developerhttps://www.blogger.com/profile/06562408639857773130noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-72749332328223069002010-04-26T05:31:02.145-07:002010-04-26T05:31:02.145-07:00I updated my old post for #2:
1. Data of a cell i...I updated my old post for #2:<br /><br />1. Data of a cell is getting scrolled when it is multiline : Yes, all multiLine data is showing but if i scroll mousewheel then data is getting scrolled of cell.No vScroll bar here. This issue should be fixed<br /><br />2. Click event : It is ok now. ListEventITEM_DOUBLE_CLICK solves my problem.DEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-33434474805993754492010-04-02T04:56:33.736-07:002010-04-02T04:56:33.736-07:00This comment has been removed by the author.DEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-38631404984547942072010-03-29T20:21:03.094-07:002010-03-29T20:21:03.094-07:001. Data of a cell is getting scrolled when it is m...1. Data of a cell is getting scrolled when it is multiline : Are you saying the scrolling is happening even when it is not required ?<br /><br />2. Click event : Isn't this the expected behavior as the UITextField doesn't cover the entire area of the cell ?<br /><br />3. ADG as itemRenderer. This is really a big feature if we want to support all the workl fows. At that point of time (and even now I guess) we don't know how many users out there would use this feature to gauge the return on effort investment.<br /><br />4. Focus: This is a requirement for Accessibility that the selection should move to the header.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-71964240326669920962010-03-29T05:54:42.068-07:002010-03-29T05:54:42.068-07:00I have few more that i faced while working with AD...I have few more that i faced while working with ADG.<br />1. In ADGitemrenderer, data of a cell is getting scrolled when it is multiline. We have to set mousewheelEnable=false of UITextField of ADGItemRenderer.<br /><br />2. Click event is captured by UItextField in ADGItemRenderer. So sometime we get ListItemrenderer and sometimes get Uitextfield as object in clickevent<br /><br />3. When we have Double grid concept (ADG as item renderer) then selectedIndex property is not working properly of master grid.<br />3. We have many times focus problems in ADG. E.g. I dont think focus of selected row should be moved to header row.DEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-83745256917851015042010-03-25T05:33:41.182-07:002010-03-25T05:33:41.182-07:00Thanks for your kind words on ADG ! I have noted y...Thanks for your kind words on ADG ! I have noted your suggestions. Keep your fingers crossed !Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-65859523513880545472010-03-24T03:29:24.669-07:002010-03-24T03:29:24.669-07:00The very good thing with ADG, it is very very flex...The very good thing with ADG, it is very very flexible component. i got what i want with ADG and according to requirment,I have also done some tweaks in ADG classes.But i also think ADG covers many difficult scenarios (e.g. locaked column, hierarchical data etc) but some scenariois are missout so ,it should be improved. thanks to sreenivas for providing us groupingCollection2 class with better performance.DEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-39543283083760203642010-03-24T03:23:29.112-07:002010-03-24T03:23:29.112-07:00This comment has been removed by the author.DEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-10442517605228689662010-03-24T03:12:18.789-07:002010-03-24T03:12:18.789-07:00Hi Sreeni,
As I have found ADG contains many featu...Hi Sreeni,<br />As I have found ADG contains many features and it is only one compoennt in RIA world that is very capable and useful. Although i am using my custom grid component for a big ERP project and it is using in 98% of my form. I am OK with its features and perfomance. but some times i get problem with variableRow height and rowCount in case of master-detail grid pattern.<br />Please Solv in next version or suggest us how we manage rowCount when variableRowHeight=true<br /><br />Thanks<br />SachinDEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-17523110829762046352010-03-24T03:11:09.653-07:002010-03-24T03:11:09.653-07:00This comment has been removed by the author.DEVSACHINhttps://www.blogger.com/profile/11141308438800960236noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-12898732287737796922009-06-11T07:15:40.619-07:002009-06-11T07:15:40.619-07:00Ditto on horizontal scrolling & grouping colle...Ditto on horizontal scrolling & grouping collection (with source code :), I know you are not 'allowed' to release this for your modified version for some political reason.<br /><br />I would imagine ADG is seriously used by more hard core coders, I've invested more than 100 hours into the grid, it's not a 5 minute demo. I use objects not loose XML, I would like to think that I'm not taking too much of a performance hit simply because you had to code this grid to lowest common denominator.<br /><br />I would like real focus on efficient object based binding, while I'm able to intercept most things in the grid and handle events based on my custom data provider there are times I had to report to using proxy objects. ONe of these being itemEditedEnd handler that basically forces something like: myRow[nameOfProperty] = newValue. If I hadn't specified dataField in my column this is very difficult to accomplish without serious hacking.<br /><br />Native right side locking and row level locking & footer row are also HUGE requested features.<br /><br />Keep up the great work and keep up the frequency and quality of recent posts, yours is probably on e fo the best ADG blogs out there.Tom Gruszowskihttps://www.blogger.com/profile/01482203400524942003noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-72534233318135019392008-10-15T07:31:00.000-07:002008-10-15T07:31:00.000-07:00Horizontal scrolling with many columns is very slo...Horizontal scrolling with many columns is very slow.Rob McKeownhttps://www.blogger.com/profile/03931278610941549167noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-27223870810351257392008-06-01T22:20:00.000-07:002008-06-01T22:20:00.000-07:00I posted a fixed version of GroupingCollection her...I posted a fixed version of GroupingCollection here<BR/><BR/>http://flexpearls.blogspot.com/2008/06/groupingcollection-with-some-better.html<BR/><BR/>See if that helps !Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-11182683838310341682008-05-27T17:25:00.000-07:002008-05-27T17:25:00.000-07:00OK, so I am a bit slow to the punch on this one, b...OK, so I am a bit slow to the punch on this one, but I've just started using ADG. I agree with Doug, GroupingCollection is great for basic stuff, but very inefficient overall.<BR/><BR/>My example:<BR/><BR/>800 records.<BR/>The user is allowed to group dynamically by selecting various Grouping fields. Each grouping has a 3 level sub-grouping, resulting in a total of 4 levels of grouping. When the user changes their grouping it results in a delay of approximately 30-40 seconds. Compare this to a SQL statement and we are looking at something many thousands of times slower. <BR/><BR/>One of the primary purposes I thought the ADG was so cool was that I could allow the client to regroup data on the fly, without the need to requery the server. Unfortunately it looks like the call to the data service is going to be far faster.TJ Downeshttps://www.blogger.com/profile/16475574914899116597noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-4487661812012547952008-05-08T06:19:00.000-07:002008-05-08T06:19:00.000-07:00hi srinivas,i am having problem regarding row colo...hi srinivas,<BR/>i am having problem regarding row color of Advanced DataGrid. I set RowColor using itemrenderer with overriddern Data method..but when I am scrolling my Advanced DataGrid, All colors mess up .. it displays colors to other rows also..<BR/>Please help me out if Possible,,<BR/>Thanks in Advance..<BR/> <BR/>With regards,<BR/>JanakJackyhttps://www.blogger.com/profile/12208749186558773289noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-83196557040793758862008-05-06T22:46:00.000-07:002008-05-06T22:46:00.000-07:00I have posted sample code hereYou need to make one...I have posted sample code <A HREF="http://sreenivas.ramaswamy.googlepages.com/xmlADG.mxml" REL="nofollow">here</A><BR/><BR/>You need to make one addition to the xml data. That you can figure out from the sample.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-28441659996783432522008-05-06T10:24:00.000-07:002008-05-06T10:24:00.000-07:00(had to take out all xml carrots and put in bracke...(had to take out all xml carrots and put in brackets for this post)<BR/><BR/>Thanks again for the example. I actually had to do it differently. I am pasting the code to what I did if you are interested. I took the grouping collection and transformed it into an xml document, removing the leaf nodes cause I didn't need them. You could easily incorporate the leaf nodes if you wanted though. So, I have another question for you. How do I use the XML as a dataprovider for adg? I can't find any info on it anywhere, except where people are saying "how do I use xml as a dataprovider", which obviously doesn't work. I've seen a couple tries using the grouping collection on xml but I don't want to group the xml, it is xml.... already grouped the way I want it. Here is my xml file.<BR/><BR/><BR/>[personnel]<BR/> [indPersonnel]<BR/> [indDetail]<BR/> [label]MAN DOG[/label]<BR/> [percent]50[/percent]<BR/> [count]2[/count]<BR/> [indDetail]<BR/> [label]CRASH[/label]<BR/> [percent]50[/percent]<BR/> [count]2[/count]<BR/> [/indDetail]<BR/> [/indDetail]<BR/> [indDetail]<BR/> [label]ZONE[/label]<BR/> [percent]50[/percent]<BR/> [count]2[/count]<BR/> [indDetail]<BR/> [label]CRASH[/label]<BR/> [percent]25[/percent]<BR/> [count]1[/count]<BR/> [/indDetail]<BR/> [indDetail]<BR/> [label]STR DOG OUT[/label]<BR/> [percent]25[/percent]<BR/> [count]1[/count]<BR/> [/indDetail]<BR/> [/indDetail]<BR/> [/indPersonnel]<BR/>[/personnel]<BR/><BR/>I'd like this xml to end up looking like the bottom right hand box in this pdf http://www.wolffebrothers.com/report.pdf<BR/><BR/>Can you help me?<BR/><BR/>Below is the code I used to convert grouping collec to xml file. It is based off a function that another adobe engineer wrote to iterate over an xml file. <BR/><BR/> private function DivideTheBox(level:int,item:Object,childNumber:int)<BR/> {<BR/> <BR/> level++;<BR/> <BR/> if(item.children) {<BR/> <BR/> pathArray[level-1] = childNumber;<BR/> var diff = pathArray.length - level;<BR/> for (var t:int = 0; t [ diff; t++) {<BR/> pathArray.pop();<BR/> } <BR/> <BR/> <BR/> if (level != 1) {<BR/> <BR/> var theLabel:String = item.GroupLabel;<BR/> var thePercent:String = item.thePercentage;<BR/> var theCoun:String = item.theCount;<BR/> <BR/> var newChildNode = new XML([indDetail][label]{theLabel}[/label][percent]{thePercent}[/percent][count]{theCoun}[/count][/indDetail]);<BR/> <BR/> switch (level) {<BR/> case 2:<BR/> xmlPressures.children()[0].appendChild(newChildNode);<BR/> break;<BR/> case 3:<BR/> xmlPressures.children()[0].children()[pathArray[(level-2)]].appendChild(newChildNode);<BR/> break;<BR/> case 4:<BR/> xmlPressures.children()[0].children()[pathArray[(level-3)]].children()[pathArray[(level-2)]].appendChild(newChildNode);<BR/> break;<BR/> }<BR/> <BR/> }<BR/> else {<BR/> xmlPressures.appendChild([indPersonnel][/indPersonnel]);<BR/> }<BR/> <BR/> for(var i:int = 0; i[item.children.length; i++) {<BR/> DivideTheBox(level,item.children[i],i);<BR/> } <BR/> }<BR/> else {<BR/> //if I want to deal with leaf nodes<BR/> }<BR/> }Nancyhttps://www.blogger.com/profile/04822159225592303056noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-18934735429822250052008-04-30T23:17:00.000-07:002008-04-30T23:17:00.000-07:00Here is a sample I was trying to write. I have not...<A HREF="http://sreenivas.ramaswamy.googlepages.com/PercentGroupSrc.zip" REL="nofollow">Here</A> is a sample I was trying to write. I have not yet completed it.<BR/><BR/>It should give you an idea about traversing the GroupingCollection nodes and how to update them.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-55327977880925196682008-04-30T15:53:00.000-07:002008-04-30T15:53:00.000-07:00I'm back, stumped bad and looking for some advice ...I'm back, stumped bad and looking for some advice if you have a little time:><BR/><BR/><BR/>ok, can't transform a groupingCollection into some sort of Hierarchical data that I can edit. What I'd like to do is pass an advanced data grid a hierarchical data structure with no leaf nodes. I tried creating a groupingCollection from flat data, passing that to a new HierarchicalData instance, but when I look at the data it looks flat and I can't traverse it like I would normally traverse a tree. <BR/><BR/> var sBs:HierarchicalData = new HierarchicalData(groupingCollP);<BR/> var sTs:HierarchicalCollectionView = new HierarchicalCollectionView(sBs);<BR/> <BR/>I also tried just using the grouping collection straight, which when looked at through the debugger is hierarchical. But... when I traverse each node I can only see the children properties, and have to way to add or remove a node which I would then pass back to the adg. <BR/><BR/> var root:Object = groupingCollP.getRoot();<BR/> TraverseTree(root[0]);<BR/><BR/>I'm also trying stuff like <BR/><BR/> myXML = new XML(groupingCollP)<BR/> traverseTree(myXML);<BR/><BR/>Man, I can't get it working. So my overall question is does somebody know how I can group flat data using a GroupingCollection and then traverse that collection adding / deleting / modifying nodes as I go. I'm not looking for the traversal algorithm, I have that. I just need to know how to get the data in the correct format.<BR/><BR/>Thanks a million times a billion for even reading this.Nancyhttps://www.blogger.com/profile/04822159225592303056noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-68953116913271800492008-04-30T01:45:00.000-07:002008-04-30T01:45:00.000-07:00Satish has posted a Tree Chart here.Satish has posted a Tree Chart <A HREF="http://flexmadeeasy.blogspot.com/2008/04/tree-chart-for-flex.html" REL="nofollow">here</A>.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.comtag:blogger.com,1999:blog-1245414118611676168.post-63794240187554887722008-04-21T20:13:00.000-07:002008-04-21T20:13:00.000-07:00HierarchicalCollectionView is a ICollectionView. S...HierarchicalCollectionView is a ICollectionView. So you can use ICollectionView.createCursor to get a IViewCursor and use it.<BR/><BR/>P.S: You may need to borrow ADG code of expandAllNodes to iterate over all nodes. IViewCursor will return only open nodes.Sreenivashttps://www.blogger.com/profile/17636694169757371801noreply@blogger.com