gp-grid-logo
Examples

Filtering

Column filtering examples

Filtering

gp-grid provides powerful column filtering with various operators.

Basic Filtering

Click the filter icon in a column header to open the filter popup:

const columns: ColumnDefinition[] = [
  {
    field: "name",
    cellDataType: "text",
    width: 150,
    filterable: true  // Default is true
  },
  {
    field: "salary",
    cellDataType: "number",
    width: 120,
    filterable: true
  },
];

Filter Operators

Text Filters

OperatorDescription
containsValue contains text
notContainsValue does not contain text
equalsExact match
notEqualsNot an exact match
startsWithValue starts with text
endsWithValue ends with text
blankValue is empty
notBlankValue is not empty

Number Filters

OperatorDescription
=Equal to
!=Not equal to
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal
betweenWithin range
blankNo value
notBlankHas value

Date Filters

OperatorDescription
=Same date
!=Different date
>After date
<Before date
betweenWithin date range

Disable Filtering

Per Column

const columns: ColumnDefinition[] = [
  { field: "id", cellDataType: "number", width: 80, filterable: false },
  { field: "name", cellDataType: "text", width: 150, filterable: true },
];

Filter Combinations

Combine multiple conditions with AND/OR logic in the filter popup.

On this page