Providing Custom Column Values when Editing

Summary

  • AdapTable usually fetches a Column's distinct values when using the Select Cell Editor or Bulk Update dropdown
  • Developers are able to override this default behaviour by providing a bespoke list of custom values

By default, when using the Select Cell Editor or the Bulk Update dropdown, AdapTable will loop through all the values in AG Grid for that column, retrieving and then displaying all the distinct items.

Hint

  • AdapTable will ignore case sensitivity by default, e.g. will return "EUR" and "eur" as 2 separate items
  • This can be changed by setting the caseSensitivePredicates property in Predicate Options to true

Alternatively developers can supply a list of bespoke, custom values to be displayed instead.

This is provided using the customEditColumnValues property in Edit Options.

customEditColumnValues

Provide custom list of values to display in Edit controls
Edit Custom Values
Fork
  • In this Demo we provide custom editing values for 2 Columns by using the customEditColumnValues property:
    • License - returns 'Permissive', 'LGPL', 'MIT', 'Public Domain'
    • Language - returns a different list for rows where Licence is not MIT License
  • Note: we provide a Select Cell Editor for both columns
Try It Out
  • Click in a cell in either Column to see the bespoke values
  • Attempt a Bulk Update on either Column to see the same bespoke values