Actual post:
Flex 2.0 Primitive Explorer [March 14, 2007]
Adobe Flex is a software development kit released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Flex applications can be written using Adobe Flex Builder or by using the freely available Flex compiler from Adobe.
Wednesday, December 12, 2007
AutoFilter Search in Flex
Actual post: AutoFilter Search in Flex
It might be really easy to search a list if you implement this feature.
This is how it is done
private var filteredListArray : Array;
private function filterList(event:Event = null) : void
{
var txtLength:Number = txtInput.length;;
var txtEntered:String = txtInput.text;
filteredListArray = new Array();
if(txtInput.text == “”)
{
listId.dataProvider = dataProvider;
return;
}
else
{
for(var i : int = 0 ; i < dataProvider.length; i++)
{
if(dataProvider[i].toString().substring(0, txtLength).toLowerCase() == txtEntered.toLowerCase())
{
filteredListArray.push(dataProvider[i]);
}
listId.dataProvider = filteredListArray;
}
}
}
TextInput calls filterList(event) every time user inputs something in the text input box
filterList(event) method carries out all the necessary functionality
It might be really easy to search a list if you implement this feature.
This is how it is done
private var filteredListArray : Array;
private function filterList(event:Event = null) : void
{
var txtLength:Number = txtInput.length;;
var txtEntered:String = txtInput.text;
filteredListArray = new Array();
if(txtInput.text == “”)
{
listId.dataProvider = dataProvider;
return;
}
else
{
for(var i : int = 0 ; i < dataProvider.length; i++)
{
if(dataProvider[i].toString().substring(0, txtLength).toLowerCase() == txtEntered.toLowerCase())
{
filteredListArray.push(dataProvider[i]);
}
listId.dataProvider = filteredListArray;
}
}
}
TextInput calls filterList(event) every time user inputs something in the text input box
filterList(event) method carries out all the necessary functionality
Subscribe to:
Posts (Atom)
Freelance
Find more freelance jobs