Load Drop down values dynamically in Data table based on values in a corresponding column

I have a data table that loads data and each row has a column with a drop down.
Based on the values in a corresponding column the values in the drop down should be different.

Can you please help me to resolve this.

You can use the onAfterEditStart() event and then filter column options depending on the value of any data attribute (id in the following sample):

http://webix.com/snippet/7877dee2

Hi Listopad. Thank you so much for the reply. It is very helpful.

However I have a question.
What if I want to have the same option available in more than one group and I dont want to change the id.

Basically, I want to have the same set of values between two groups, but based on some Parameter, I would like to show additional values to a particular group.

filter can be a more complex function

list.filter(function(itemObj){
    return true; //false;
})

depending on some conditions, each item (itemObj) can be displayed or not.

ive achieved this by like this:

first ive added an event onBeforeEditStart to datatable

next i’ve loaded the table with columns that have “combo” list of values without the list.

the data into the dropdown loads just before the user clicks on the editable column. otherwise it remains static. in my scenario, the columns are editable. that is why ive choosen an before edit event.

one can choose just before binding the data. or any other event that one is comfirtable.

finally in the event :
logic.beforeGridCellBeforeEditStart = function (id) {

var colConfig = grid.getColumnConfig(id.column);

// collection is undefined, because we have not bound data to the respective column

if ( typeof (colConfig.collection) === “undefined”) {
var temp = extOptionsData.find(item => item.CNAME === colConfig.id); // this is my logic to get the data from external source
colConfig.options = JSON.parse(temp.VALUE);
grid.refreshColumns(CommonFunctions.getCurrentGrid()._columns);
}
}

https://snippet.webix.com/6btejgzt

hope this works.

https://snippet.webix.com/qjo9o7z4