If you pass an Array or ArrayCollection to a DataGrid that has
editable="true" and click on or tab to cells and change their values,
the Array or ArrayCollection has been modified.  The DG does not keep
its own private copy of modified values.

 

You can read it out via this.mygird.dataProvider[0].FirstName.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Azar
Sent: Saturday, November 03, 2007 2:14 PM
To: [email protected]
Subject: [flexcoders] Re: i cant get my edited data our of my grid :(

 

but i am going to edit the data in the grid so accessing the data 
from the array would defeat the purpose of getting the data from the 
array.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "candysmate" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> , "Michael Azar" <mazarflex@> 
wrote:
> >
> > this.mygrid.data[0].FirstName
> > (DOESNT WORK--can you fix it for me.)
> > i assume its something like that.
> > 
> > 
> > 
> > I have a simple question. All I want to do is loop through I data 
grid 
> > to get the data out. not the data from the data provider but the 
actual 
> > data (once edited) directly from the DG.
> > I assume it is similar to looping through an array but it's 
taking me 
> > too long to figure it out. 
> > 
> > and also how can i get this to work while using a check box item 
render 
> > ie. how can i get the data out of a custom item renderer?
> >
> 
> You need to address / manipulate your dataProvider. The dataGrid 
acts
> like a 'window' to your data, but you can't reach durectly through 
the
> window to get at your data. So if you have an arrayCollection as 
your
> dataProvider with cloumns 'name','age' and 'height' and you want to
> access the age data for the first item in the dataGrid you would use
> 
> var ageRequired:Number = myArray.getItemAt(0).age
>

 

Reply via email to