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:

Warm regards,
Kaleem B N


  • edited October 2017


    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({
      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:

  • Thanks a lot Helga..

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!