You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can someone show me some sample code on how to repopulate the drop down option list on selecBoxIt control? This list populates perfectly from a JSON object, but when I remove, populate, refresh, I am left with an empty list:
$("#selSM4").data("selectBox-selectBoxIt").remove();
$("#selSM4").selectBoxIt({
populate: function () { var deferred = $.Deferred(), arr = [], x = -1;
$.ajax({ url: 'http://localhost:58933/home/AllSchoolList?subject'
}).done(function (data) {
while (++x < data.length) {
arr.push({text: data[x].name, value: data[x].value,
}); }
deferred.resolve(arr);
});
return deferred; }
});
$("#selSM4").data("selectBox-selectBoxIt").refresh();
The "populate" works initially. Why not when i try to "populate" with a different list?
Can someone show me some sample code on how to repopulate the drop down option list on selecBoxIt control? This list populates perfectly from a JSON object, but when I remove, populate, refresh, I am left with an empty list:
$("#selSM4").data("selectBox-selectBoxIt").remove();
$("#selSM4").selectBoxIt({
populate: function () { var deferred = $.Deferred(), arr = [], x = -1;
$.ajax({ url: 'http://localhost:58933/home/AllSchoolList?subject'
}).done(function (data) {
while (++x < data.length) {
arr.push({text: data[x].name, value: data[x].value,
}); }
deferred.resolve(arr);
});
return deferred; }
});
$("#selSM4").data("selectBox-selectBoxIt").refresh();
The "populate" works initially. Why not when i try to "populate" with a different list?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: