The problem here is that the assignment of the axis object will not copy the
properties, but will make your variable reference the new object. The
dataProvider of the DataGrid will still be bound to the seriesList of the
old object. To make this more clear: suppose during application startup,
your axis variable is referencing the object obj1, then dataProvider is
bound to obj1.seriesList. When you assign a new object to axis, axis now
refernces obj2, while dataProvider is still referencing obj1.seriesList
which did not change, that's why it's not being updated with the new data.
What you can do is create a local bindable seriesList variable, bind the
dataProvider to it and assign it axis.seriesList every time you have a new
axis object.


On Wed, Sep 17, 2008 at 9:18 PM, netdeep <[EMAIL PROTECTED]> wrote:

>   I have a custom component with a DataGrid in it. The dataprovider is an
> actionscript object
> (the variable name for this object is axis) with an ArrayCollection called
> seriesList. When I do
> axis.seriesList.addItem(), the DataGrid updates properly, but when I simply
> assign a new axis
> object (such as for a load) to my component (even for a brand new
> component) with a
> seriesList already defined, it does not update at all. How can I get the
> DataGrid to update
> properly?
>
> <mx:DataGrid id="seriesTable" dataProvider="{axis.seriesList}" >
> <mx:columns>
> <!-- columns defined here... -->
> </mx:columns>
> </mx:DataGrid>
>
>  
>



-- 
Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com

Reply via email to