function complete(args) {
// var vinet = "VINET";
$.ajax({
url: '@Url.Action("GetDocs")',
type: "POST",
dataType: "json",
//contentType: 'application/json; charset=utf-8',
data: { value: 70, count: 8 },
success: function (data) {
var parsedData = data;
$("#Grid").ejGrid("dataSource", parsedData.result);
$("#Grid").ejWaitingPopup("hide");
}
}); |
$("#Grid").ejGrid("dataSource", ej.DataManager({url:"UrlDataSource", adaptor: new ej.UrlAdaptor() }); |
|
if I use datamanager, how to send json object as a param to controller?
$(function () {
var dataManager = ej.DataManager({ url: "/Home/DataSource", adaptor: new ej.UrlAdaptor() });
$("#Grid").ejGrid({
dataSource: dataManager,
query: new ej.Query().addParams("value", 5 ).addParams("count",6),
. . .
});
});
[controller]
public ActionResult DataSource(Syncfusion.JavaScript.DataManager value, Test t)
{
. . .
}
public class Test
{
public string value { get; set; }
public int count { get; set; }
}
|