在window.refresh kendo grid mvc中发送对象

时间:2015-12-02 14:27:12

标签: c# asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 kendo-asp.net-mvc

在javascript中我想在kendowindow刷新对象

var object = {
            Number: "dfs",
            Id : 1,
            SelectedId:"dsf"
        }

var window = $("#Window").data("kendoWindow");
        window.refresh({
            url: url,
        data: {
            item: object
        }
    });

型号:

public class Weight
{
   public string Number { get; set; }
   public int Id { get; set; }
   public string SelectedId { get; set; }
}

参数是空的

public ActionResult Update(Weight item)
{
}

我如何正确地将对象发送到服务器?

1 个答案:

答案 0 :(得分:0)

尝试使用

window.refresh({
            data: JSON.stringify(object),
            url: url,
        });