1 Reply Latest reply on Dec 16, 2007 1:42 PM by peterent

    several datagrids questions

    how2flex
      Hello, I have some special troubles using datagdrid, I am wondering if someone could help me with this...
      1) how to acces datagrid by rows? I have some datagrid, there are some columns with dataFields set, and I would like to read all the rows - row by row, column by columns, and save it to the file. Or I would like to check if some cell is not equal to "some_string". But I don't know what dataProvider is like, so I cannot access it directly, I only know that it is ArrayCollection of some value objects, but I don't know the object itself.

      2) When I sort and filter the datagrid manually, how can I get the list of sorted/filtred items? example: two datagrids on the stage - one has a dataProvider of an ArrayCollection of some strings... I will sort (+filter) this datagrid, and I want the second datagrid to show the the same sorted/filtered data as well (or at least indices), but without setting anything like sort or filter function in this second datagrid...

      Thank you very much :-)
        • 1. Re: several datagrids questions
          peterent Level 2
          The DataGrid is just a view of the data - what's in the dataProvider property you set on the DataGrid. To read your data just access the dataProvider. If it is an ArrayCollection you can loop over the records (eg mydata ) and then you'll have access to all of the fields in each record.