Define options to the cell having editor as combo in datatable

Hi Webix team,

I referred defining of options dynamically to the combo and tried the same but not able to achieve it in my scenario.

Please find the below snippet for the same:
https://webix.com/snippet/52e3b1af

Warm regards,
Kaleem B N

Hello,

It’s not a good practice to change column editor on the fly, but still it’s possible to implement your requirement.

You need to initialize date and list popups for Combo and Date editors:

var listSuggest = webix.ui({
  view:"suggest", 
  data:[ {id:"Apple", value:"Apple"}, {id:"Banana", value:"Banana"} ]
});

var dateSuggest = webix.ui({
  view:"suggest", type:"calendar"
});

Please note that the id and value of list options must coincide to avoid visualization problems.

Then, in the onBeforeEditStop handlers you will need not only to change the editor name, but the editor popup:

if(neededEd == "combo") 
      this.getColumnConfig(id.column).popup = listSuggest;
else if(neededEd =="date")
      this.getColumnConfig(id.column).popup = dateSuggest;

Check the snippet, please: https://webix.com/snippet/209706f2

Thanks a lot Helga…