1 Reply Latest reply on Sep 24, 2007 8:47 AM by KomputerMan.com

    showing selected row at top of datagrid

    KomputerMan.com Level 1
      Hello all you Flexers out there.
      Got a little problem that I need some help with. I have a datagrid that has between 10 and 50 items in it at any given moment in time, depending on other events within the application.
      The problem is if I have 50 items in my datagrid and I programatically select the 25th item it is not seen by the end user unless they manually scroll down to view it.

      What I would like to do is force the data grid to automatically scroll down so the selected item is shown. How do I do this???
      Here is the code that I use to select the correct row within the datagrid when the page is activated, this code works fine, only problem is that it does not scroll the datagrid down to the selected item.
      Any help is more than appreciated!!!

      if (model.selectedUser.fk_id_agy != 0){
      for(var x:int = 0; x < model.allAgyCodes.length; x++){
      if (model.selectedUser.fk_id_agy == model.allAgyCodes[x].id_agy){
      mySecLevelAgy.agyCodesDG.selectedIndex = x;

      Thanks in advance for the assistance!!!

      Have an Ordinary Day...
      KomputerMan ~|:-)