Solved

How to filter Data in a Flex List component as the user type

Posted on 2009-05-12
2
2,414 Views
Last Modified: 2012-06-22
I have list component with 800 data items. I want to filter the data as the user type on keyboard.

e.g if the user press letter "A" I want to filter the list data to only starting with A.

Any help on this?

Thanks
Vimal
0
Comment
Question by:VKN9876
  • 2
2 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 500 total points
ID: 24374740
* The dataprovider of your list is an ArrayCollection (of 800 items)
* Apply a filter function to that ArrayCollection.

I would start with a TextInput field where you can type in characters.

myCollection.filterFunction = myFilterFunction;
myCollection.refresh();

with

protected function myFilterFunction(obj:Object):Boolean {
      // here you return only true in case the first x characters equal the x characters typed in in your text field
}
0
 
LVL 37

Expert Comment

by:zzynx
ID: 24500705
Hi VKN9876, any questions left?
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question