Setting initial values on load with Select2 with Ajax
Updated to new version:
Try this solution from here http://jsfiddle.net/EE9RG/430/
$('#sel2').select2({
multiple:true,
ajax:{}}).select2({"data":
[{"id":"2127","text":"Henry Ford"},{"id":"2199","text":"Tom Phillips"}]});
Maybe this work for you!! This works for me...
initSelection: function (element, callback) {
callback({ id: 1, text: 'Text' });
}
Check very well that code is correctly spelled, my issue was in the initSelection
, I had initselection