In the document, I can read:
.multiselect ('setOptions', options) Used to change the configuration after initializing the multi selector. This can be useful in combination with .multiselect ('rebuild').
You may not be able to change your widget data in your original way. You must use the setOptions method setOptions .
Else: Maybe you should consider destroying your widget .multiselect('destroy') and create it again after.
Update after comment:
In the document: (you linked)
Provides data for constructing selection options as follows:
var data = [ {label: "ACNP", value: "ACNP"}, {label: "test", value: "test"} ]; $("#multiselect").multiselect('dataprovider', data);
So: When you receive data from your ajax call, you need to create an array of objects (these are the parameters in your choice) in a format like
var data = [ {label: 'option1Label', value: 'option1Value'}, {label: 'option2Label', value: 'option2Value'}, ... ]
When an array of objects is created, you just need to call the method
$("#multiselect").multiselect('dataprovider', data);
Where data is your array of objects.
I hope I understand: /
source share