我想通过ajax更改dgrid数据源

时间:2019-06-06 01:57:09

标签: datasource dgrid

我想通过ajax更改dgrid数据源,但这不起作用。

$.ajax({
                type: "POST",
                data: JSON.stringify({ fileName: filename, bandId: bandid, productType: producttype, productLevel: productlevel, cloudCover: cloudcover, startCalendar: startcalendar, endCalendar: endCalendar }),
                url: "searchAttribute.aspx/btnSearch_Click",
                contentType: "application/json;charset=utf-8",
                async: false,
                success: function (data) {
                    var json=$.parseJSON(data.d);
                    var memStore = new Memory({ data: json });
                    parent.grid.set("collection", memStore);
                    parent.grid.refresh(true);
                    grid.startup();
                },
                error: function (err) {
                    alert(err);
                }
            })

0 个答案:

没有答案