C# 如何从剑道ui网格中检索代码隐藏中的id字段

C# 如何从剑道ui网格中检索代码隐藏中的id字段,c#,asp.net,kendo-grid,C#,Asp.net,Kendo Grid,我有一个剑道网格,可以很好地工作,但当我想删除一行,我没有得到 要传递给代码隐藏方法的记录的id。 当它到达后面的代码时,会显示:“undefined”(指参数varId)。 怎么了 var transpContactLeads = { read: function(options) { $.ajax({ type: "POST", url: "xx.aspx/GetLeadsDate", contentType: "application/json; charse

我有一个剑道网格,可以很好地工作,但当我想删除一行,我没有得到 要传递给代码隐藏方法的记录的id。 当它到达后面的代码时,会显示:“undefined”(指参数varId)。 怎么了

var transpContactLeads = {
read: function(options) {
   $.ajax({
    type: "POST",
    url: "xx.aspx/GetLeadsDate",
    contentType: "application/json; charset=utf-8",
    data: "{'varId': '" + options.id + "'}",
    dataType: 'json',
    success: function(msg) {
        options.success(msg);
    }
    });
    },
    destroy: function(options) {
    $.ajax({
    type: "POST",
    url: "xx.aspx/UpdateGrid",
    contentType: "application/json; charset=utf-8",
    data: "{ 'varId': '" + options.id + "' }",
    dataType: 'json',
    success: function(msg) {
        options.success(msg);
    }
    });
    },
    parameterMap: function(options, type) {
    if (type == "destroy") {
    return {
    varId: options.id
    };
    }
    return options;
}
};

//DataSources
var dsContactLeads = new kendo.data.DataSource({
    transport: transpContactLeads,
    schema:
    {
    data: "d",
    //total: "d.length",
    model:
    {
    id: "id",
    fields:
    {
    id: { type: "int" },
    Name: { type: "string" },
    Province: { type: "string" },
    Investment: { type: "string" },
    DateContact: { type: "string" }
    }
}
    },
    pageSize: 10
});

//Grid
var gridContactLeads = $("#grid").kendoGrid({
dataSource: dsContactLeads,
columns:
[
 { command: ["destroy"], title: " ", width: "175px" },
 { field: "id", filterable: false},
 { field: "Name", title: "Name", width: 240},
 { field: "Province", width: 120, title: "Province" },
 { field: "Investment", width: 120, title: "Investment" },
 { field: "DateContact", width: 92, title: "Date" },

],
 editable: "inline",
 selectable: true
});

数据中:“{'varId':'”+b+“}”
,变量
b
是否定义在某个地方?对不起,我删除了变量b。当我删除剑道网格行时,它在方法destroy中失败。
$调用的
数据
参数不是假定为对象而不是字符串吗?(删除引号)