Skip to content

Number Filter

Use the Core number filter for prices, quantities, percentages, scores, and other numeric fields. It needs no Pro plugin.

Source code
TypeScriptts
grid.columns = [{ prop: 'price', name: 'Price', filter: 'number' }];
grid.filter = true;

return [{ price: 60 }, { price: 100 }, { price: 150 }, { price: 225 }];
const grid = document.querySelector('revo-grid')!;
grid.columns = [
{ prop: 'price', name: 'Price', filter: 'number' },
{ prop: 'quantity', name: 'Quantity', filter: 'number' },
];
grid.filter = true;
grid.source = [
{ price: 120, quantity: 2 },
{ price: 80, quantity: 10 },
];
Saved IDPopup labelMeaning
eqN=Equal
neqN!=Not equal
gt>Greater than
gte>=Greater than or equal
lt<Less than
lte<=Less than or equal
emptyIs blankUses the blank policy
notEmptyIs not blankInverse of the blank policy

Numeric comparisons require the parsed cell value to be a number. Use cellParser when source values arrive as formatted strings.

Use two conditions joined by and:

grid.filter = {
multiFilterItems: {
price: [
{ id: 1, type: 'gte', value: 100, relation: 'and' },
{ id: 2, type: 'lte', value: 500, relation: 'and' },
],
},
};
grid.columns = [
{
prop: 'price',
name: 'Price',
filter: 'number',
cellParser: (model, column) =>
Number(String(model[column.prop] ?? '').replace(/[$,]/g, '')),
},
];

Filtering and bounds-based Pro controls use the parsed number. Blank checks still use the original source value and own-property presence.

Use Core operators when users know the exact threshold they want. Choose a visual control when the data shape should guide them:

  • Use eqN for numeric equality and eq for text equality.
  • Convert numeric strings with cellParser; gt, gte, lt, and lte do not treat arbitrary strings as numbers.
  • Keep 0 distinct from blank unless your application explicitly changes the blank policy.
  • Use two conditions for a range; there is no Core between operator in the popup.