I am facing an issue in with a parameter query grid. When I click on the current item and items display data. I put loader on an AJAX call but the loader is not working properly. It binds data not from the current item - it displays data from the previous item selected.
function tree_grid(ID) {
$("#divLoading").show();
$.ajax({
type: "POST",
url: '/Schedule/GetAllPresentation',
data: "{ scheduleID: '" + ID + "',YearId:" + YearId + ",CompanyId:" + CompanyId + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function(response) {
$("#divLoading").hide();
var data1 = [];
data1 = $.parseJSON(response);
data = data1;
},
error: function() {
swal("", "Error in Data !", "error");
}
});
}