Closed pooja297 closed 10 months ago
This is my function call `var myData = { loadData: function (filter) { $("#someGrid").show();
var d = $.Deferred();
$.ajax({
type: "GET",
url: "/TableMaintenance/GetData?id=null&productId=" + ProductId() + "&TypeId=" + TypeId(),
dataType: "json",
data: filter
}).done(function (response) {
if (response.success) {
d.resolve(response.data);
myData.data = response.data;
} else {
alert("error: " + response.error);
$('#ItemCount').text('Your search failed');
}
}).fail(function(xhr) {
var errMsg = 'Your search failed';
alert(errMsg);
});
return d.promise();
}
}`