• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2427
  • Last Modified:

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

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?

  • 2
1 Solution
zzynxSoftware engineerCommented:
* 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;


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
zzynxSoftware engineerCommented:
Hi VKN9876, any questions left?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now