@Jake, I am implementing search-as-you-type, so there's a separate input box outside of the itemrender that needs to show/hide items that match or don't match what was typed in. I am using the *change* event of the search box.
@Tracy, thanks for the suggestion, I tried that originally and it worked, but the experience was lacking because all items would disappear then re-appear on every key press. I would like for only the specific items affected to fade-out or fade-in when required. So far it seems adding an IsVisible property will work. When the input box *changes* I update the collection then invalidate the container's properties (or refresh the collection?). Depending on how that works out, I may or may not need to add commitProperties logic. Baz On Wed, Aug 12, 2009 at 1:45 PM, Tracy Spratt <tr...@nts3rd.com> wrote: > > > To show/hide items, use a filter on the collection. It does not actually > remove any items. > > > > Tracy Spratt, > > Lariat Services, development services available > ------------------------------ > > *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On > Behalf Of *Baz > *Sent:* Wednesday, August 12, 2009 4:21 PM > *To:* flexcoders@yahoogroups.com > *Subject:* Re: [flexcoders] ItemRender - Access Specific Item at Run-time > > > > > > Thank you very much Tracy. > > What do you suggest to show/hide specific items based on an outside event? > I am hesitant to *remove* the item from the ArrayCollection as I have to add > it back at some point, maintaining the same complicated sort order. > Currently my ArrayCollection contains a list of custom objects, would you > suggest I had a property to those objects called *isHidden*, or something > along those lines, and use that to set the state to "hidden"? > > Thanks a lot. > > > > On Wed, Aug 12, 2009 at 1:14 PM, Tracy Spratt <tr...@nts3rd.com> wrote: > > > > “access to the components that get created from the ArrayCollection… Is > there a way?” Short answer, no. > > > > Longer answer: itemRenderers are recycled and only the visible renderers > even exist. When using item renderers, any state that depends on the > item/row must be driven by the item. You need to set up your renderer so > that when an underlying item property changes, that change causes the > rendered component’s state to change. > > > > You do this by overriding the set data() function and commitProperties > function. > > > > Find an example of an itemRenderer and modify it rather than trying to do > this from scratch. > > > > Tracy Spratt, > > Lariat Services, development services available > ------------------------------ > > *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On > Behalf Of *Baz > *Sent:* Wednesday, August 12, 2009 3:57 PM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] ItemRender - Access Specific Item at Run-time > > > > > > I have a custom ItemRender that uses an ArrayCollection dataProvider. > Everything loads up and displays nicely, but I am having a heck of a time > finding out how to get at a specifc item in the list to change its state - > something like myDataContainer.ItemArray[10].state = "my_custom_state" to > get at the 10th item. Bear in mind its not the source ArrayCollection that I > need to get at, that's no problem, its access to the components that get > created from the ArrayCollection that I'm looking for. Is there a way? > > Thanks very much. > > > > > >