You can define your cellEditorParams
function in a way that returns different values depending on values of another column.
Here is a sample from the ag-grid site -
cellEditor : 'agSelectCellEditor';
cellEditorParams: function(params) {
var selectedCountry = params.data.country;
if (selectedCountry==='Ireland') {
return {
values: ['Dublin','Cork','Galway']
};
} else {
return {
values: ['New York','Los Angeles','Chicago','Houston']
};
}
}
Take a look at this example from official docs. You will have to replace agRichSelectCellEditor
with agSelectCellEditor
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…