getFilter

returns the filter object that is used to filter the values of the specified column

object|HTMLElement getFilter(id columnID);
columnIDidthe id of a column
object|HTMLElementthe Webix view object or the HTML element of the filter

Example

columns:[
    { id:"title", header:["Film title", {content:"textFilter"}] },
    { id:"year", header:["Released", {content:"selectFilter"}] }
]
// ...
 
// gets to the filter object of each column and retrieves its current value
var title = this.getFilter("title").value; 
var year = this.getFilter("year").value;

Related samples

Details

Depending on the filter type, the method returns either the HTML element or the Webix view object of the filter.

An HTML element is returned for the filters based on HTML5 inputs:

  • textFilter
  • numberFilter
  • selectFilter
  • dateFilter
  • server equivalents of the above

A Webix view object is returned for the filters based on Webix inputs:

  • richSelectFilter
  • multiSelectFilter
  • multiComboFilter
  • datepickerFilter
  • dateRangeFilter
  • server equivalents of the above
See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix best ui framework and page of tree grid ui product.