Set cell dropdown source on dropdown click

Tags: #<Tag:0x00007efc649e1af8> #<Tag:0x00007efc649e19b8>

Hi, I am trying to dynamically define a cell source where the cell type is set to dropdown. When a user clicks the dropbown icon within the cell I would like to initiate a query to our database to get the dropdown values and then apply them into the dropdown shown on screen.
The issue I have is that the query itself is firing correctly but the dropdown is always empty until I esc off the cell and then click the dropdown again at which point the dropdown list is correctly showing. am I missing something?
I’ve tried this in beforeOnCellMouseDown and afterOnCellMouseDown functions.

image

First click of dropdown
image

Second click after escaping or moving cell
image

Hi @lbrown

When you click the arrow to open the list, it is already too late. To make the call for the values’s I recommend doing something like this https://jsfiddle.net/0u51w6e4/, where you pass a function as the source of the dropdown. Then, within the function, you can do what you want.