I am using selectpicker with 1.12.1 version. when i try to load more then 1000 records it will take time to load once click. Below code i am using to bind dropdown.
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "AjaxGetDropdown.aspx?Type=getengine&MajorID=" + MajorID + "&MacModID=" + MacModId,
success: function (data) {
if (data != null && data != '') {
$.each(data, function () {
if (document.getElementById('<%=hfEngModID.ClientID%>').value == this['VALUE']) {
$("#dpEngine").append($("<option selected='selected'></option>").val(this['VALUE']).html(this['TEXT']));
} else {
$("#dpEngine").append($("<option></option>").val(this['VALUE']).html(this['TEXT']));
}
});
$("#dpEngine").selectpicker('refresh');
}
},
error: function (data) {
}
});