I also just discovered that if I store the openItems (to keep the
hierarchy open where it was) then the filtering doesn't show until it
is closed and opened again.

                public function doUpdates() : void {
                        DAO.getInstance().searchText=search.text;
                        var openItems:Object = testGrid.openItems;
                        testGrid.dataProvider = new
HierarchicalData(DAO.getInstance().structuredLists);
                        testGrid.openItems = openItems;
                }

Is there a way to get the AdvancedDataGrid to refresh it's list (and
keep the list open where it was?).

cheers,
Paul


On 9/27/07, Paul Dale <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I may be missing something, but I haven't been able to find a good way
> to have a run-time filter for a hierarchical AdvancedDataGrid.
>
> If one using an arraycollection directly the display is flat, and when
> a HierarchicalData object is used then the ArrayCollection is
> converted to a HierarchicalCollectionView and the filterFunction on
> the ArrayCollection is not used.
>
>
> I've got an approach working that resets the dataprovider each time
> with a new HierarchicalData from the array (after it has been
> filtered), but it seems like there must be a better way.
>
> public function doUpdates() : void {
>   testGrid.dataProvider = new
> HierarchicalData(DAO.getInstance().structuredLists);
> }
>
> <mx:TextInput id="search" change="doUpdates();" width="200"/>
>
> With a filter on the arrays in structuredLists that uses the text from
> the search textInput.
>
> Any suggestions on how to do this better?
>
> Thanks in advance.
>
> Kind regards,
> Paul
>

Reply via email to