Currently I read the data needed for the ComboBox like:
$(domNode).kendoComboBox({
dataSource: {
transport: {
read: function(options) {
setReadOptions && setReadOptions(options);
const filters = that.getDataSourceData(options.data);
const serviceUrl = `${trackUrl.includes('?') ? trackUrl + '&' : trackUrl+'?'}${that.encodeData(filters)}`;
ajax.get<any>(serviceUrl)
.then((returnObj) => {
let comboBoxOptions = returnObj;
if (filterOptions) {
comboBoxOptions = filterOptions(returnObj);
}
options.success(comboBoxOptions);
}).fail(() => {
options.error("Could not retrive data for selected document Id.");
})
},
prefix: ''
},
. . . . .
Now there is the possibility of the url that is used could change. Based on that changed url I would like to set new options with a call to something like I do for when the ajax method returns
if (filterOptions) {
comboBoxOptions = filterOptions(returnObj);
}
options.success(comboBoxOptions);
I know I can refresh the comboBox with something like
this.comboBox.dataSource.read()
But I don't know how to also affect the options for the comboBox?
Kevin