Packagecom.flexicious.grids.filters
Classpublic class Filter
InheritanceFilter Inheritance Object
Subclasses AdvancedFilter, PrintExportFilter

A container object that encapsulates all the individual property filter settings, page settings and the sort state.



Public Properties
 PropertyDefined By
  ALL_ITEM : String = All
[static]
Filter
  arguments : ArrayCollection
A collection of com.flexicious.grids.filters.FilterExpression objects.
Filter
  filterDescrption : String
For the filter dropdown, show the label for the pre built filters.
Filter
  pageCount : int
The number of pages
Filter
  pageIndex : int
The current page index.
Filter
  pageSize : int
Size of the page
Filter
  recordCount : int
The total number of records
Filter
  records : Object
Filter
  sorts : ArrayCollection
A collection of com.flexicious.grids.filters.FilterSort objects.
Filter
Public Methods
 MethodDefined By
  
Constructor
Filter
  
addCriteria(columnName:String, expression:Object):void
Adds a
Filter
  
addFilterExpression(filterExpression:FilterExpression):void
Expression to add
Filter
  
addOperatorCriteria(columnName:String, operation:String, compareValue:Object, wasContains:Boolean = false):void
Adds a com.flexicious.grids.filters.FilterExpression to the current list.
Filter
  
addSort(sortColumn:String, isAscending:Boolean, sortComparisionType:String = auto, sortCompareFunction:Function = null):void
Adds a com.flexicious.grids.filters.FilterSort object to the list.
Filter
  
copyFrom(filter:Object):void
Takes a filter and populates the current filter's properties with the provided filter
Filter
  
getFilterExpression(fld:String):*
Given a filter column, returns the corresponding filter expression.
Filter
  
getFilterValue(fld:String):*
Given a filter column, returns the corresponding value of the filter expression of that column.
Filter
  
removeCriteria(searchField:String):void
Removes a previously added com.flexicious.grids.filters.FilterExpression from the current list that matches the specified search field.
Filter
Property Detail
ALL_ITEMproperty
public static var ALL_ITEM:String = All

argumentsproperty 
arguments:ArrayCollection

A collection of com.flexicious.grids.filters.FilterExpression objects.


Implementation
    public function get arguments():ArrayCollection
    public function set arguments(value:ArrayCollection):void

See also

filterDescrptionproperty 
public var filterDescrption:String

For the filter dropdown, show the label for the pre built filters.

pageCountproperty 
pageCount:int

The number of pages


Implementation
    public function get pageCount():int
    public function set pageCount(value:int):void
pageIndexproperty 
pageIndex:int

The current page index.


Implementation
    public function get pageIndex():int
    public function set pageIndex(value:int):void
pageSizeproperty 
pageSize:int

Size of the page


Implementation
    public function get pageSize():int
    public function set pageSize(value:int):void
recordCountproperty 
recordCount:int

The total number of records


Implementation
    public function get recordCount():int
    public function set recordCount(value:int):void
recordsproperty 
public var records:Object

sortsproperty 
sorts:ArrayCollection

A collection of com.flexicious.grids.filters.FilterSort objects. Must be just 1 for Basic DataGrid, but can be more than one for advanced datagrid.


Implementation
    public function get sorts():ArrayCollection
    public function set sorts(value:ArrayCollection):void

See also

Constructor Detail
Filter()Constructor
public function Filter()

Constructor

Method Detail
addCriteria()method
public function addCriteria(columnName:String, expression:Object):void

Adds a

Parameters

columnName:String
 
expression:Object

See also

addFilterExpression()method 
public function addFilterExpression(filterExpression:FilterExpression):void

Expression to add

Parameters

filterExpression:FilterExpression

addOperatorCriteria()method 
public function addOperatorCriteria(columnName:String, operation:String, compareValue:Object, wasContains:Boolean = false):void

Adds a com.flexicious.grids.filters.FilterExpression to the current list. If an Filter Expression was added with the same column name previously, overwrites the operation and the compareValue

Parameters

columnName:String — The column to filter on
 
operation:String — The filter operation to apply. See com.flexicious.grids.filters.FilterExpression for a list of available operations.
 
compareValue:Object — The expression to filter with. A single value in case of Binary operators like equals, greater than, less than, and an array for rante operators like between, in list, etc.
 
wasContains:Boolean (default = false)

See also

addSort()method 
public function addSort(sortColumn:String, isAscending:Boolean, sortComparisionType:String = auto, sortCompareFunction:Function = null):void

Adds a com.flexicious.grids.filters.FilterSort object to the list. Must be just 1 for Basic DataGrid, but can be more than one for advanced datagrid.

Parameters

sortColumn:String
 
isAscending:Boolean
 
sortComparisionType:String (default = auto)
 
sortCompareFunction:Function (default = null)

See also

copyFrom()method 
public function copyFrom(filter:Object):void

Takes a filter and populates the current filter's properties with the provided filter

Parameters

filter:Object — to copy

getFilterExpression()method 
public function getFilterExpression(fld:String):*

Given a filter column, returns the corresponding filter expression.

Parameters

fld:String

Returns
*
getFilterValue()method 
public function getFilterValue(fld:String):*

Given a filter column, returns the corresponding value of the filter expression of that column.

Parameters

fld:String

Returns
*
removeCriteria()method 
public function removeCriteria(searchField:String):void

Removes a previously added com.flexicious.grids.filters.FilterExpression from the current list that matches the specified search field.

Parameters

searchField:String

See also