AdvancedDataGrid Scroll/Sort-Bug

Steps to reproduce:
Scroll the datagrid to middle position.
Sort by column "id".
Change sort order from ascending to descending.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
     <mx:Script>
     <![CDATA[
          import mx.collections.ArrayCollection;
          import mx.collections.HierarchicalData;
          public var testData:ArrayCollection = new ArrayCollection([
               {id:1,children: [{id:11},{id:12},{id:13}]},
               {id:2,children: [{id:21},{id:22},{id:23}]},
               {id:3,children: [{id:31},{id:32},{id:33}]},
               {id:4,children: [{id:41},{id:42},{id:43}]},
               {id:5,children: [{id:51},{id:52},{id:53}]},
               {id:6,children: [{id:61},{id:62},{id:63}]},
               {id:7,children: [{id:71},{id:72},{id:73}]},
               {id:8,children: [{id:81},{id:82},{id:83}]},
               {id:9,children: [{id:91},{id:92},{id:93}]},
               {id:10,children: [{id:101},{id:102},{id:103}]},
               {id:11,children: [{id:111},{id:112},{id:113}]},
               {id:12,children: [{id:121},{id:122},{id:123}]}
     ]]>
     </mx:Script>
     <mx:AdvancedDataGrid width="400" height="200">
          <mx:dataProvider>
               <mx:HierarchicalData source="{testData}" />
          </mx:dataProvider>
     </mx:AdvancedDataGrid>
</mx:Application>

Hi,
Please find the following code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
     <mx:Script>
     <![CDATA[
          import mx.collections.ArrayCollection;
          import mx.collections.HierarchicalData;
          public var testData:ArrayCollection = new ArrayCollection([
               {id:1,children: [{id:11},{id:12},{id:13}]},
               {id:2,children: [{id:21},{id:22},{id:23}]},
               {id:3,children: [{id:31},{id:32},{id:33}]},
               {id:4,children: [{id:41},{id:42},{id:43}]},
               {id:5,children: [{id:51},{id:52},{id:53}]},
               {id:6,children: [{id:61},{id:62},{id:63}]},
               {id:7,children: [{id:71},{id:72},{id:73}]},
               {id:8,children: [{id:81},{id:82},{id:83}]},
               {id:9,children: [{id:91},{id:92},{id:93}]},
               {id:10,children: [{id:101},{id:102},{id:103}]},
               {id:11,children: [{id:111},{id:112},{id:113}]},
               {id:12,children: [{id:121},{id:122},{id:123}]}
     ]]>
private function sortNumeric(obj1:Object, obj2:Object):int {
            var value1:Number = (obj1.id == '' || obj1.id == null) ? null : new Number(obj1.id);
            var value2:Number = (obj2.id == '' || obj2.id == null) ? null : new Number(obj2.id);
            if (value1 < value2) {
               return -1;
            } else if (value1 > value2) {
              return 1;
            } else {
              return 0;
     </mx:Script>
     <mx:AdvancedDataGrid width="400" height="200">
          <mx:dataProvider>
               <mx:HierarchicalData source="{testData}" />
          </mx:dataProvider>
          <mx:columns>
                    <mx:Array>
                        <mx:DataGridColumn dataField="id" headerText="id" sortCompareFunction="sortNumeric"/>
                    </mx:Array>
                </mx:columns>
            </mx:DataGrid>
     </mx:AdvancedDataGrid>
</mx:Application>
Thank you

Similar Messages

  • How do you tell if the advanceddatagrid scroll bars are showing?

    How do you tell if the advanceddatagrid scroll bars are showing? This is because the grid crashes when mouse scroll events are firing when theres not enough data so that scroll bars are not showing

    Basically when you have enough data in a datagrid so that it cannot all be displayed at once, you have the scrollbars showning allowing you to scroll.When you can see all the data or rows at once you cannot see the scrollbars. What I need to test for is whether these SB's are currently showning.
    Hope that is clearer.

  • 7.5 still has sorting bugs

    When are they going to fix these huge sorting bugs?
    Can I go back to 7.1 in Leopard?

    dversion wrote:
    Chris,
    If Apple wants to keep it this way then I guess I have to fix my luddite ways. There is logic in the new sorting obviously. It is strange when you look at you files in Finder and "The Beatles" are in the T's instead of the B's
    The Finder is a different kind of organization system — it's less like a library, and thus doesn't use the library standard trick of ignoring articles (which originated as a way of keeping the "T" card catalog drawers from growing out of control!). The Finder requires a less "intelligent", but less variable, means of organizing files.
    On a more positive note, is it possible to add sort info multiple songs from the same artist in one click, the same way you can change the year etc.
    Yep — control-click the track you changed, then use "Apply Sort Fields..."

  • IPad2 iOS5 random photo sorting bug?

    After upgrading my iPad2 to iOS5, the photo sorting in albums appears to be totally randomized which makes it pretty much unusable. Is this a bug? Before the upgrade, it used to be sorted by the time the photo was taken and this was at least better than apparent random sorting. Reverting to the previous sort method would be a good fix. Better would be to have a simple way to control the sort order.

    I have lion and all of the latest updates, moved from mobile me to i cloud but my "albulms" on the i pod, i phone and i pad won't stay in the same order that they are in i photo or i tunes. The genius bar at the store went through everything and said that it's an update problem that will have to fix it. I hope they get to work quickly. 2 years ago I was promised by a senior tech that the album sorting problem would be fixed in i photo (about 20% of my albums won't stay sorted by title no matter what I do and about 80% will) and that has never been fixed.
    I pray that they read these forums and realize their problems that need to be fixed because it's impossible to go to a saved item on my iphone or ipad without any order to the sorting.

  • AdvancedDataGrid scrolling up issue

    Hi,
    I have a AdvancedDataGrid that display a hierarchy source, there is one issue that when scrolling up from bottom, the item are repeating,
    such as : pciture 1 (currect display the hierarchy), pciture 2 (items are repeated after scrolling up), picture 3 (the expected display)
    picture 1
    picture 2
    picture 3
    Here is the definition for the AdvancedDataGrid:
    <mx:AdvancedDataGrid id="layer_datagrid" headerHeight="0"
    editable="true" selectable="true" verticalGridLines="false"
    iconFunction="{null}" folderClosedIcon="{null}" folderOpenIcon="{null}" >
    <mx:dataProvider>
    <mx:HierarchicalData source="{this.layerList}"/>
    </mx:dataProvider>
    <mx:columns>
    <mx:AdvancedDataGridColumn id="empty_Col" editable="false" draggable="false" width="50"/>
    <mx:AdvancedDataGridColumn id="layersName_col" dataField="name" editable="false" itemRenderer="com.woodwing.digitalmagazine.views.renderers.LayerNameRenderer" draggable="false"/>
    <mx:AdvancedDataGridColumn id="layersCheckBox_col" dataField="selected" editable = "false" itemRenderer="com.woodwing.digitalmagazine.views.renderers.LayerRenderer" width="18" headerText="" resizable="false" draggable="false"/>
    </mx:columns>
    Definition for the LayerNameRenderer
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
    width="100%" height="60" >
    <mx:Script>
    <![CDATA[
    import com.LayerItemVO;
    ]]>
    </mx:Script>
    <mx:HBox>
    <mx:HBox id="indent" width="{LayerItemVO(data).indent}"/>
    <mx:HBox>
    <mx:HBox id="color" backgroundColor="{LayerItemVO(data).layerColor}" width="9" height="14"/>
    <mx:Label id="layerNameInUse" height="18" enabled="{LayerItemVO(data).enabled}" text="{LayerItemVO(data).name}"/>
    </mx:HBox>
    </mx:HBox>
    </mx:Canvas>
    Please provide any hint to solve this issue.
    p.s. I need to define an empty column (id=empty_col), otherwise the enabled on layerRenderer dose not work.
    Thanks.

    Sree_D,
    I defined the hierarchy source for renderer as Bindable object, such as
    this.LayerList is ArrayCollection of LayerItemVO
    [Bindable]
    public class LayerItemVO {
         public var children:ArrayCollection;
         public var name:String = "";
         public var layerColor:uint = 0x0;
         public var enabled:Boolean = true;
         public function LayerItemVO () {
              this.children = new ArrayCollection();
    You also see the definition of LayerNameRenderer in previous post.
    Do you see any problem on the code snippet?
    I have tried to follow what Adobe taught about how to define the AdvancedDataGrid, and still not know why the renderer didn't get updated when scrolling up/down. The AdvancedDataGrid did display the hierarchy data correctly.
    Can you let me know how to verify the data are getting set in renderers when scrolled up/down? Is there any event followed the scrolling?
    Maybe I can write out some log on this event.
    Also you mentioned that the first column should be group item renderer, can you give me example how to define a group item renderer?
    Thanks.

  • Add bookmark button and horizontal scroll bar - bugs on Snow Leopard

    Safari after update to 5.1.4, has a bug in interface on Snow Leopard (10.6.8): 'add bookmark' button (combined with addres bar), and horizontal scroll bar didn't look good.  I think, that shouldn't happend on flagship Apple browser, on just a little older OS X than 'Lion'.
    Clearing (deleting files) 'Cache.db' and .plist files didn't help.

    Ok..  maybe corrupted Safari preferences  (.plist )
    Quit Safari.
    Go to ~/Library/Preferences
    Move the com.apple.Safari.plist file from the Preferences folder to the Desktop.
    Relaunch Safari. If that helped, move the .plist file to the Trash.
    If not, move it back to the Preferences folder.
    If that didn't help, go to Safari > Preferences then select the Extensions tab. If you have any installed, turn that OFF, quit then relaunch Safari to test.
    If it's not a plugin, try troubleshooting Safari third party unsupported add ons >  Safari: Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    edited by:  cs

  • AdvancedDatagrid scroll bar buttons

    Hello Guys, I've created an AdvancedDataGrid and i've populated it with an XML file. I need to increase the size of the Scroll Bar buttons.
    Is it possible?
    How can I do?
    byee!

    I do not have any linux system, but located this item:
    re; openSUSE
    http://opensuse.14.x6.nabble.com/Scrollbar-arrows-inT-bird-and-FF-td4999329.html
    scroll down as this person fixed the same issue you seem to be experiencing.
    Also Linux REdhat Fedora:
    http://comments.gmane.org/gmane.linux.redhat.fedora.general/424758
    quote:
    ''In my case, something during the upgrade to f17 has changed xfce's
    Appearance/Style to using Adwaita-style. This style lacks arrows
    on scrollbars and therefore hardly usable in scenarios like yours or mine.''
    ''Changing 'Appearance/Style' to a different 'style' through
    Application Menu>Settings'>Appearance->Style
    brought back the arrows.''

  • Safari 6 scrolling & navigation bug

    Open a page which contains a FRAME element.
    Scroll to middle or bottom of the page.
    Click a link.
    The new opened page is scrolled.(not show the top of page content)
    And the mouse cursor is not in the correct position. verify step:
    double click
    notice the text selection position and the mouse position

    I take a picture to demostrate the bug. In the new opened page, double click, please notice the selection position and the mouse cursor position.

  • Sorting bug

    It isn't possible to sort images manually (after having sorted by date) within the Event view.
    I really can't believe that Apple didn't test something so crucial to this app. Not to mention they explain how to do it in the help section! The new iPhoto seems to have so many new great features, but I wasted at least an hour of my time trying to figure out what I was doing wrong and in the end this turned out to be a bug?! Very frustrating.
    Just to be clear. I'm trying to sort my photos by date within an Event AND then manually overide that to re-order a few images. The help section says you can do this under "Sorting Events and photos":
    +You can sort by one of the options above, then manually sort photos within that order. To do so, choose View > Sort Events or View > Sort Photos, and then choose Reset Manual Sort. This allows you to sort Events or photos by date, for example, and then to drag the sorted Events or photos into an order you prefer.+
    This does NOT work in the Event view. You can change the order in the Photos view, but it doesn't reflect in the Event

    That is correct
    You also can manually reorder photos in an album but as of now no one has been able to do it in an event as the help states you can
    It would be good to provide this feedback directly to Appls ( iPhone menu ==> Provide iPhoto feedback)
    Larry Nebel

  • AdvancedDataGrid, SummaryField2 sorting

    Hi,
    Is there a way to sort an AdvancedDataGrid with summary rows by the summary values (using SUM)?  I'm using a GroupingCollection2 as the data provider for the AdvancedDataGrid with an flat ArrayCollection as the source for the GroupingCollection2.  The original ArrayCollection is sorted in correct order but the end result is the AdvancedDataGrid is displaying the groups/summary rows in alphabetical order.
    Thanks,
    Wade.

    Hello.
    I'd suggest changing it to
    function mySortFunc(itemA:object, itemB:Object):int
      if (itemA['ID'] == 0)
        return -1; //summary row goes before everything
      if (itemB['ID'] == 0)
        return 1; //everything goes after summary row
    else
    // my own compare algorythm ...
    In general, best practice is to never return 0 unless itemA==itemB, and that should not happen either.
      Milan

  • Solution for AdvancedDatagrid scroll issue.

    I am using an AdvancedDatagrid which uses a Datagrid as its itemrenderer. The rowCount of the renderer Datagrid is assigned as dataProvider.length. On expanding a particular row, if the datagrid has more than 20 records, am not able to view all the records of the renderer datagrid. This occurs because the scroll takes me to the next row of the AdvancedDatagrid instead of showing the remaining records of the expanded Datagrid. Am able to see all the records if the datagrid rowCount is set as 10 or 15, but my requirement is such that only the AdvancedDatagrid can have a scrollBar. The renderers inside should not have scrollBars. Please provide me a solution to fix this issue.My screen looks like the below image. The renderer datagrid is shown in red. It has 50 records. But on scrolling am not able to see them, instead taken to the next row of AdvancedDatagrid.

    That's nice !!! Thanks for sharing this...
    I believe that I can make it

  • MUSE CC 2014 SCROLL FX BUG

    Any scroll fx (Motion & opacity) doesn't work when published to businesscatalyst with Muse CC 2014 . All scroll fx are disabled. Scroll Fx are working correctly in local HTML and preview but when publish it to businesscatalyst.com all scroll fx doesn't work.
    This bug seems only on businesscatalyst.com.

    I received your email and am waiting for your reply with the .muse site to investigate further.
    Thanks,
    Dana

  • LR 1.2: metadata browser sorting bug

    Hi all,
    after updateing from LR 1,1 to 1.2, i sadly noticed that the sorting order of the ISO values are totally mixed up. In 1.1 the list was sorted by ISO from low to high, 100,200,400, and so on ... now, it´s sorted "alphabetical", 100, 1600, 200, 3200, 400 ...
    this is really annoying. Anything i can do about it? Didn´t check with apterure values, but they might be mixed up, too.
    Can anybody confirm this bug?
    Regards,
    Markus

    Hi,
    I saw the same on my computer after upgrade to 1.2
    All pictures imported with 1.1 or 1.0 were sorted in a metadata category "Iso", where the different Iso-settings were sorted alphabetical. Newly imported images got a metadata category "Iso Empfindl." (=sensitivity) where the settings where sorted correctly.
    If you do then some minor metadata edit on the old images they got also moved to the new category "Iso Empfindl." - which took quiet some while with 20.000+ images.....

  • AdvancedDataGrid + IHierarchicalCollectionView + filterFunction bug: Example and workaround

    Yay, bugs!
    My first question is, do you get this bug too? I'm running Flex 3.4 in Flash player 9.
    My second question is, am I doing something wrong, or is this something that should be fixed in Flex?
    Error: Bookmark no longer valid.
        at ListCollectionViewCursor/seek()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\c ollections\ListCollectionView.as:2048]
        at mx.collections::HierarchicalCollectionViewCursor/get current()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\collections\Hiera rchicalCollectionViewCursor.as:198]
        at mx.collections::HierarchicalCollectionViewCursor/collectionChangeHandler()[C:\work\flex\d mv_automation\projects\datavisualisation\src\mx\collections\HierarchicalCollectionViewCurs or.as:1056]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.collections::HierarchicalCollectionView/internalRefresh()[C:\work\flex\dmv_automation\ projects\datavisualisation\src\mx\collections\HierarchicalCollectionView.as:806]
        at mx.collections::HierarchicalCollectionView/refresh()[C:\work\flex\dmv_automation\projects \datavisualisation\src\mx\collections\HierarchicalCollectionView.as:686]
        at ADGBookMarkBug/step4()[C:\eclipse-clearcase-flex-datatools\workspace-usOnCC\ADGBookMarkBu g\src\ADGBookMarkBug.mxml:70]
        at ADGBookMarkBug/___ADGBookMarkBug_Button6_click()[C:\eclipse-clearcase-flex-datatools\work space-usOnCC\ADGBookMarkBug\src\ADGBookMarkBug.mxml:99]
    My code is here:
    http://jafile.com/uploads/kristopherwindsor/paste/wowflexreally.txt
    I was able to reproduce the bug in the above code after discovering it in a larger project.
    If you run that, and click the buttons for steps 1 - 4 in that order, it will crash when you click button "step4", unless you click the button for step 3.5, which prevents it from crashing. Button "step3info" just shows the selected item in the ADG.
    I don't know if this needs any more explanation, but if it does, just ask.
    Thanks!

    Looks like the problem is with GroupingCollection2 as it works fine with GroupingCollection in Flex 3

  • Does 3.1.2 fix the application icon sorting bug?

    hello,
    i notice that this new version of iTunes is buggy, the previous version would respect the icon sorting, but this new iTunes and iPhone OS version does not respect the sorting of icons...
    the new feature to visualize the pages (i have 9 pages, more than 100 apps) does work partially...
    is it only me?
    the icons are sorted randomly...
    and no matter if i choose sort by date, by name, category, it does NOT work....
    please help~!

    well, i'm considering the fact that i am using Tiger 10.4.11 on a PPC Power BookG4, since the rest of the iTunes features work perfectly ok...
    I had to check the specs. Those seem to be OK.
    i now tried removing all the apps from iPod, and then i sync with just 20 apps... and this part worked fine, the checked apps were installed (and not the whole bunch of apps) and the 'sort by category' "seems" to be respected...
    With the 3.0 update on the iPhone 3G that was the approach I took when none of the apps worked after the upgrade. I put them back in groups of about 10 after a couple of restore attempts failed. In the end they all worked fine. The iPod touch was unaffected, so there must have been something in the iPhone itself.
    BTW, i did not install 3.1.2 yet... on purpose.. some ppl seemed to have issues...
    Some people always have issued. Or, there are always some people with issues.

Maybe you are looking for

  • Exporting report as PDF

    Hi, Is there any provision in BAM to export a report in PDF ,Excel,PPT or word format. I would really appreciate if someone could give me a solution regarding this. Regards, Lathika

  • Error while trying to login dyn.admin

    I followed the instructed provided in the below link http://docs.oracle.com/cd/E35319_01/Platform.10-2/ATGInstallGuide/html/s0304oracleweblogic01.html and while accessing the dyn/admin am getting the following error Error getting compiled page Unable

  • When I try and download photos from my camera, the system automatically launches Photo Viewer in Win 8.1.  This causes my Adobe Bridge to lock up.

    I recently bought a new computer with Win 8.1 installed.  When I installed CS6 64 bit, the installation went seamlessly.  My problem is that when I try and download images from my camera, it automatically launches the Windows Photo software to downlo

  • Out of order my ipad

    I would like to receive any comments of my ipad problem. A few days ago, I charged my pad during playing podcast. I slept listening the podcat. After wake up I was just shocked. Because my pad is turned off. I tried to turn on many times by using hom

  • Re:error in report builder wizard user interface

    I am getting error 'REP-31954: Error in the Report Builder Chart Wizard user interface'. The help subsystem states that I should make sure that the Chart Builder Wizard libraries are properly installed. I am sure they are because all other wizards wo