Solved

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

Posted on 2009-05-12
2
2,412 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now