Skip to main content

Number Filter

Number Filters allow you to filter number data.

Using Number Filter

Text filter is represented by class AgNumberColumnFilter.

ColDef colDef = ColDef.builder()
.field("currentValue")
.filter(new AgNumberColumnFilter())
.build()

Number Filter Parameters

Number Filters are configured though the filter params (NumberFilterParams class)

PropertyTypeDefaultDescription
inRangeInclusivebooleanfalseIf true, the 'inRange' filter option will include values equal to the start and end of the range.
includeBlanksInEqualsbooleanfalseIf true, blank (null) values will pass the 'equals' filter option.
includeBlanksInNotEqualbooleanfalseIf true, blank (null) values will pass the 'notEqual' filter option.
includeBlanksInLessThanbooleanfalseIf true, blank (null) values will pass the 'lessThan' and 'lessThanOrEqual' filter options.
includeBlanksInGreaterThanbooleanfalseIf true, blank (null) values will pass the 'greaterThan' and 'greaterThanOrEqual' filter options.
includeBlanksInRangebooleanfalseIf true, blank (null) values will pass the 'inRange' filter option.

Example of using filter parameters.

ColDef colDef = ColDef.builder()
.field("currentValue")
.filter(new AgNumberColumnFilter()
.filterParams(
NumberFilterParams.builder()
.inRangeInclusive(true)
.includeBlanksInEquals(true)
.includeBlanksInNotEqual(true)
.includeBlanksInLessThan(true)
.includeBlanksInGreaterThan(true)
.includeBlanksInRange(true)
.build()
)
)
.build()

Number Filter Model

Text filter model is represented by NumberFilterModel class.

If more than one Filter Condition is set, then multiple instances of the model are created and wrapped inside a Combined Model (CombinedSimpleModel<NumberFilterModel>).

Grid using Server Side Number Filter

  • Trade Id uses default filter config
  • Submitter Id has inRangeInclusive set to true
  • Submitter Deal ID has both includeBlanksInEquals and includeBlanksInNotEqual set to true
  • Current Value has both includeBlanksInLessThan and includeBlanksInGreaterThan set to true
  • Previous Value has includeBlanksInRange set to true
  • Backend source code available here