Providing Custom Column Values when Editing

View as Markdown

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

  • The default list is the Column's distinct raw values
  • If the data contains both "EUR" and "eur", both appear

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 license 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
Loading demo…