Waiting on a server-side bugfix, so enjoy. Working example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">

    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;

            [Bindable]
            private var allProducts : Array = [
                {
                    name: "Datsun 120y",
                    value : 1000
                },
                {
                    name: "Nissan 350Z",
                    value : 55000
                },
                {
                    name: "Porsche GT3",
                    value : 325000
                },
                {
                    name: "HSV Clubsport",
                    value : 79999
                },
                {
                    name: "Mercedes SLR",
                    value : 1200000
                },
                {
                    name: "Lada Niva",
                    value : 75
                },
                {
                    name: "Ford Falcon XY GTHO",
                    value : 375000
                },
                {
                    name: "Batmobile",
                    value : 654321
                },
                {
                    name: "Ford Falcon XA GTHO",
                    value : 2200000
                }];

            [Bindable]
            private var filteredList : ArrayCollection = new
ArrayCollection(allProducts);

            private function updateFilter() : void
            {
                filteredList.filterFunction = myFilterFunction;
                filteredList.refresh();
            }

            private function myFilterFunction(item : Object) : Boolean
            {
                //trace("filter item " + item + " between " + min.value + "
and " + max.value);
                return item.value >= min.value && item.value <= max.value;
            }

        ]]>
    </mx:Script>

    <mx:DataGrid horizontalCenter="0" verticalCenter="0" width="410"
height="354" dataProvider="{filteredList}">
        <mx:columns>
            <mx:DataGridColumn headerText="Car Name" dataField="name"/>
            <mx:DataGridColumn headerText="Value" dataField="value"/>
        </mx:columns>
    </mx:DataGrid>
    <mx:HSlider verticalCenter="-191" horizontalCenter="0" minimum="0"
maximum="2000000" id="min" liveDragging="true" change="updateFilter()"/>
    <mx:HSlider verticalCenter="191" horizontalCenter="0" minimum="0"
maximum="2000000" id="max" liveDragging="true" change="updateFilter()"
value="2000000"/>
    <mx:Label text="Min" textAlign="right" width="117"
horizontalCenter="-147" verticalCenter="-191"/>
    <mx:Label text="Max" textAlign="right" width="117"
horizontalCenter="-147" verticalCenter="191"/>

</mx:Application>


On Wed, Aug 6, 2008 at 3:57 PM, stinasius <[EMAIL PROTECTED]> wrote:

> hi if you dont mind could you clarify on the trace statement, am not
> sure i understand what you said or how to go about it. thanks
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to