Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Difference between FDS and LCDS 7 350
Most efficient way of merging 2 ArrayCollections 4 894
[HELP PLEASE] -- calc columns in datagrid 13 481
Flex SDK setup 1 354
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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 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