Ah yes, keep forgetting about that sort requirement.

 

So yes, your code is fine, or Graham can just write his own search loop.

 

FWIW, truly hard-core folks would not use [i] to access a dataprovider
as it may not implement IList and only ICollectionView, but nobody has
yet shown me such an implementation.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tony Alves
Sent: Sunday, September 16, 2007 8:41 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Searching array for item

 

Alex,
I have tried the method you suggest, but it did not act the way I
wanted, because it forces me to create a sort on my ArrayCollection,
which sorts my grid.  
I extended the datagrid to find the value I am looking for based on the
value and the name of the value.  Let us know if you see a disadvantage
to doing this.

http://example.3alves.com/superdatagrid/
<http://example.3alves.com/superdatagrid/> 
right click to see the source:
http://example.3alves.com/superdatagrid/srcview/
<http://example.3alves.com/superdatagrid/srcview/> 

Graham,
Wait for Alex to give the green light before you use this approach.  I
have only used it with my ComboBox 's and am not sure if it is good
practice.

Regards,
Tony

Alex Harui wrote: 

        Yeah, sorry, createCursor(), and findAny, findFirst, or
findLast, which if they return true, leaves the cursor.current on the
item found.

         

        
________________________________


        .

        
<http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=87361/stime=1189997114/nc1=4507179/nc2=3848641/nc3=4706133> 
        
        

 

Reply via email to