Skip to main content

getHeaderFilter()

returns an object with a set of methods for the header filter of the specified column

getHeaderFilter(colId: string | number): object;

Parameters:

  • colId: string | number - the id of a column

Returns:

An object with a set of methods which let you work with the header filter of the specified column. The methods are:

  • blur() - removes focus from the filter
  • clear() - clears the value set in the filter
  • focus() - sets focus on the filter
  • getFilter() - returns either an HTML object or an object with Combobox configuration
  • setValue() - sets a value by which a column will be filtered

Example

const countryFilter = grid.getHeaderFilter("country");
countryFilter.setValue("Brazil");

Change log:

  • The returned value was changed in v8.0. Check the Migration article
  • The method was added in v7.0

Related sample: Grid. Get header filter

Related article: Getting header filter