5 Replies Latest reply on Jan 13, 2009 8:23 AM by Xilian

    extract specified cell data from datagrid

    Xilian Level 1
      how do i get obtain a specific cell's information from a datagrid assuming that i know it's row index and column index? Over at Actionscript forums, the only solution was a getItemAt(rowIndex)[columnIndex]. Seems it's either deprecated from flex 3 or totally removed. How do i do this in flex 3 or actionscript?
        • 1. Re: extract specified cell data from datagrid
          Level 7

          "Xilian" <webforumsuser@macromedia.com> wrote in message
          news:gkg6du$c0j$1@forums.macromedia.com...
          > how do i get obtain a specific cell's information from a datagrid assuming
          > that
          > i know it's row index and column index? Over at Actionscript forums, the
          > only
          > solution was a getItemAt(rowIndex)[columnIndex]. Seems it's either
          > deprecated
          > from flex 3 or totally removed. How do i do this in flex 3 or
          > actionscript?

          getItemAt is a method of ListCollectionView and its subclasses (i.e. the
          dataProvider).

          HTH;

          Amy


          • 2. Re: extract specified cell data from datagrid
            Xilian Level 1
            okay...i checked the API. its there alright. But it still doesn't seem applicable in extracting datagrid cell data.
            • 3. Re: extract specified cell data from datagrid
              dpark1113 Level 1
              I always extract data from dataprovider not from datagrid. dp.getItemAt(0).fieldname.
              • 4. Re: extract specified cell data from datagrid
                Level 7

                "dpark1113" <webforumsuser@macromedia.com> wrote in message
                news:gkg9gl$g2b$1@forums.macromedia.com...
                >I always extract data from dataprovider not from datagrid.
                >dp.getItemAt(0).fieldname.

                Note that the row index would go in where the 0 is above. If you implement
                IDropInListItemRenderer (I assume the reason you're finding this difficult
                is because you're trying to do it from within an ItemRenderer), then you
                have access to this via listData. However, you get the translated version
                with labelField/labelFunction applied in listData.label. Also, the entire
                row's data is available in the data property.

                Why don't you back up a step or two and tell us what you're trying to
                accomplish so that we can give you more specific help?


                • 5. Re: extract specified cell data from datagrid
                  Xilian Level 1
                  Okay we wanted to extract displayed data from existing datagrids. However, with the rapid data updates to the datagrids, we realized that since there was the possibility of working with "stale" data, it was best we focus on extracting from the dataprovider itself. Thanks for the suggestions....and oh..we did use the getItemAt()...function in the extraction process.