0 Replies Latest reply on Jun 24, 2008 1:36 PM by GeorgeWS

    Slider Filter

    GeorgeWS Level 1
      I have a slider:

      <mx:HSlider id="myslider" width="175" thumbCount="2"
      values="[1,100]" snapInterval="1" labels="['Low', 'High']" minimum="1" maximum="100" change="sliderChangeTwo(event)" dataTipFormatFunction="getSliderLabel" showTrackHighlight="true" allowThumbOverlap="false" themeColor="#73B9B9"/>

      and a datagrid with a bunch of columns. and a filter that works great with all of the dropdown and text filtering here is the filter:

      public function processFilter2(item:Object):Boolean
      {
      var result:Boolean=false;
      var pattern:RegExp = new RegExp("^"+txtFilter2.text,"i");
      if(!item[String(columnfilter2.selectedItem.data)].length
      || item[String(columnfilter2.selectedItem.data)].match(pattern) &&
      (qtyfilter2.selectedItem.label == "Qty" || item.QW0101 == qtyfilter2.selectedItem.data) &&
      (varfilter2.selectedItem.label == "Varietal" || item.WVAC5W == varfilter2.selectedItem.data) &&
      (appfilter2.selectedItem.label == "Appellation" || item.WAPC5W == appfilter2.selectedItem.data) &&
      (coufilter2.selectedItem.label == "Country" || item.WCOC5W == coufilter2.selectedItem.data) &&
      (item.WGLS5W >= thumbTwoB || item.WGLS5W <= thumbTwoA)
      )
      {
      result=true;
      }
      return result;
      }


      This is the part I cannot get to work:
      (item.WGLS5W >= thumbTwoB || item.WGLS5W <= thumbTwoA)

      It does not look right.

      Any thoughts

      George