JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › DropDownList › Drop Down List With On Demand Ajax Calls › Reply To: Drop Down List With On Demand Ajax Calls
December 6, 2019 at 6:14 pm
#100533
admin
Keymaster
Is there anything that needs to be down to initiate the data binding? Below is my code and it does not appear to be working (none of the console.log messages are being shown)
groupDropDown.dataSource = function (query, callback) {
console.log(‘here’);
//The Ajax request goes here
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
console.log(‘here2’);
if (this.readyState == 4 && this.status == 200) {
console.log(result);
callback(result);
}
};
xhttp.open(“GET”, “/Ajax/Ajax_group.aspx/GetDeviceGroupsForSmartDropDown”, true);
xhttp.send();
}