kad1r
1/21/2016 - 7:34 AM

When you edit your data, you may need to add value to selectize.

When you edit your data, you may need to add value to selectize.

var $select = $("#id_of_element").selectize();
var control = $select[0].selectize;
// This line depends your source
// I'm getting value and text from json
control.addOption({ Value: 99, Text: "Foo" });
control.addItem(99);
// if you can't see your item is added try to refresh selectize options
control.refreshOptions();