To expand on Deepa's suggestion, you can easily filter an arrayCollection that is used as a dataProvider with the following code. Call the filterGrid() function from the comboBox change event.
- TH
public function filterGrid():void
{
gridDataProvider.filterFunction=statusFilter;
gridDataProvider.refresh();
}
public function statusFilter(item:Object):Boolean
{
return item.status == cboStatusFilter.selectedItem;
}
// status is the name of the array element (field) to be filtered
--- In [email protected], "djbrown_rotonews" <[EMAIL PROTECTED]> wrote:
>
> I know that the DataGrid has a filterFunction param where you can
> specify any filtering capabilities you want to display in the
> DataGrid. Can this function call be re-issued programmatically? I've
> got an app where I want to display some data from a jsp call, filtered
> based on initial (and default) values of some combo boxes, but
> also "re-filtered" again if the user selects another value from the
> combo box without re-calling the jsp again. Is that possible?
>
> I'm willing to add a button called "filter" to capture the current
> states of the combo boxes and trigger the filterFunction call again if
> that helps. The filterFunction expects one arg though, so a straight
> call to filterData() from the filter button's click method won't do
> the trick.
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

