Hello friends, I tried using filterFunction not get any results, check out this example:
[Bindable]
public var SearchLoadlistOneDP:ArrayCollection;
public function SearchList():void {
SearchLoadlistOneDP.filterFunction = filter;
SearchLoadlistOneDP.refresh()
}
public function filter(item:Object):Boolean
{
var beginsWithString:String = SearchLoadlistOneInput.text;
return String(item["email"]).indexOf(beginsWithString) == 0;
}
And I used the datagrid like this:
<mx:DataGrid x="10" dataProvider="{SearchLoadlistOneDP}" y="49" width="891" height="408" id="listamail" creationComplete="LoadlistOne(0)">
<mx:columns>
<mx:DataGridColumn headerText="id" dataField="id" width="80"/>
<mx:DataGridColumn headerText="E-mail" dataField="email"/>
<mx:DataGridColumn headerText="Nome" dataField="nome"/>
</mx:columns>
</mx:DataGrid>
And text input like this:
<s:TextInput x="62.6" y="9.75" width="408" id="SearchLoadlistOneInput" keyUp="SearchList()" />
But unfortunately I can not any results, and the datagrid already has data from the database already has data listed on it.
Can anyone help?, Thank you all now