Thanks!  Works great.

As usual it was something very simple, i'm sure i'll make use of the 
ListCollectionView class a lot more.

I didn't try the other suggestion by assing a new array collection 
the source from the copied but i'm guessing they are similar in 
nature.

--scott

--- In [email protected], "Paul Williams" <[EMAIL PROTECTED]> wrote:
>
> Take a look at the ListCollectionView class - you can pass 
your 'master'
> ArrayCollection into its constructor (because ArrayCollection 
implements
> IList). You can then set filter options on your ListCollectionView
> without affecting the 'master'. So you'd probably want to create a
> ListCollectionView for each of your individual views:
> 
>  
> 
> 
http://livedocs.adobe.com/flex/2/langref/mx/collections/ListCollection
Vi
> ew.html
> 
>  
> 
> You can use a ListCollectionView as a dataProvider for your datagrid
> controls because it implements the required interfaces (just like
> ArrayCollection). The ListCollectionView will also listen for 
changes to
> the underlying 'master' list and update accordingly.
> 
>  
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of scott_flex
> Sent: Monday, March 26, 2007 4:11 PM
> To: [email protected]
> Subject: [flexcoders] filterFunction issue with shared array 
collection
> in model / shared list
> 
>  
> 
> 
> I have a shared arraycollection of value objects. Singeton, only 
one 
> instance of this array collection.
> 
> Dfferent views (in a tab navigator) are generated using this shared 
> array collection but each view filters the data in a datagrid list 
with 
> different criteria.
> 
> So.. in each view i utilized the filterFunction to correctly filter 
the 
> array collection and only display what i needed into my datagrid. 
That 
> works great.
> 
> However, when i set the filter function and refresh the 
arrayCollection 
> all my other views (tab windows) change as well because they are 
all 
> databound to the shared array collection...
> 
> This does make sense... but not what i want. Maybe i need to put 
the 
> filter on the datagrid for each view, not the array collection.
> 
> Am i going about this wrong? I'm a newbie cairngorm and i believe 
this 
> is an issue that others would run into.
>


Reply via email to