tabalinas / jsgrid

Lightweight Grid jQuery Plugin
http://js-grid.com
MIT License
1.53k stars 353 forks source link

Help needed with JsGrid loadData function after I upgraded an old project to .net 7.0 #1429

Closed pooja297 closed 10 months ago

pooja297 commented 10 months ago
pooja297 commented 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();
}

}`