Just create a filterFunction on you ArrayCollection, that filter function would
check each row to see if it matches the criteria for each of your filters. If
it matches it returns true, if not false. Your grid will then only show the
items that passed the filter.
----- Original Message -----
From: Shannon Hicks
To: [email protected]
Sent: Friday, September 14, 2007 9:58 PM
Subject: Re: [flexcomponents] Datagrid with hideable rows
The trick is to convert the date to a number (the number of seconds since,
say, Jan 1,1970... I forget what that's called). You can do that on your
database end... Just have another column in your select statement. Then, you
can bind the date slider to that (not displayed) numeric column via a filter
function. Same goes for profit range, etc.
Shan
On 9/14/07, phdcpe01 <[EMAIL PROTECTED]> wrote:
Hello,
I'm trying to do something that's similar to the Dashboard example on
Adobe, where a slider specifies which dates should be shown in a
datagrid. However, instead of using one slider, I'd like to have
multiple sliders (1 for the date, another for profit range, etc). The
slider example simply sorted the data according to date, and then
sliced the array at the ends. This isn't an option with my data, since
a sort on price may lead to something that isn't sorted on dates. What
I think is feasible is to have a function that sets a flag if a row
meets all sliders' conditions. I would like to then use that flag to
specify whether the data item shows up in the datagrid. Is that
possible? Or, is there a better solution?
Example:
Data items: Price Date <=Price Slider=>
4.5 Jan 1 <=Date Slider=>
2.6 Feb 1
6.7 Mar 1
Person sets price slider to be from 2 to 5. Only first 2 show in grid.
User then Sets date to be Jan. Only 1st item shows in grid.