Jquery 如何从剑道网格单元格中选择值?

Jquery 如何从剑道网格单元格中选择值?,jquery,kendo-grid,Jquery,Kendo Grid,我需要捕获用户在以下字段中输入的值: 异丁烷 串联串 下面代码中的注释显示了我想在哪里使用这些变量 这里我唯一不知道怎么做的就是如何引用这两个字段中的值。我不知道是否有一个具体的方法,我应该这样做与剑道或尝试使用jquery 例如,如果我检查元素concatenationString,我会看到: <input type="text" class="k-input k-textbox" name="concatenation" data-bind="value:concatenation

我需要捕获用户在以下字段中输入的值:

  • 异丁烷
  • 串联串
下面代码中的注释显示了我想在哪里使用这些变量

这里我唯一不知道怎么做的就是如何引用这两个字段中的值。我不知道是否有一个具体的方法,我应该这样做与剑道或尝试使用jquery

例如,如果我检查元素concatenationString,我会看到:

<input type="text" class="k-input k-textbox" name="concatenation" data-bind="value:concatenation">

以下是网格定义:

function directorsOrRecipients(e)
{
    $("<div/>").appendTo(e.detailCell).kendoGrid({
        reorderable: true,
        resizable: true,
        dataSource: {
            transport: {
                read: {
                    url: "http://localhost/x/api/Awards/directors/" + e.data.AwardTitleId,
                    type: "GET"
                },
                create: {
                    url: "http://localhost/x/api/awards/directors",
                    type: "POST",
                    data: {
                        awardTitleId: e.data.AwardTitleId,
                        personId: localStorage.personId,
                        nameId: localStorage.nameId,
                        isOnBallot: "True",//I need to get this value based on the user input.,
                        concatenationString: "test1",//I need to get this value based on the user input.
                        whoEntered: 0
                    }
                }
            },
            schema: {
                model: {
                    id: "namefirstlast",
                    fields: {
                        "namefirstlast": { editable: true, type: "string" },
                        "directorsequence": { editable: true, type: "number", validation: { min: 1 } },
                        "isonballot": { editable: true, type: "boolean" },
                        "concatenation": { editable: true, type: "string" },
                        "MoreNames": {
                            editable: true,
                            type: "number",
                            validation: { min: 0 }
                        },
                    },
                },
            }
        },
        columns: [
            { field: "namefirstlast", title: "Name", editor: namesAutoComplete },
            { field: "directorsequence", title: "Director Sequence", format: "{0:n0}" },
            { field: "isonballot", title: "On ballot?" },
            { field: "concatenation", title: "Concatenation" },
            { field: "MoreNames", title: "More names?", format: "{0:n0}" },
            { command: ["edit"], title: "&nbsp;", width: 100 }],
        sortable: true,
        sort: { field: "namefirstlast", dir: "desc" },
        editable: "inline",
        toolbar: [{
            name: "create",
            text: "Add New Director/Recipient"
        }]
    });
}
职能总监或代理人(e)
{
$(“”).appendTo(e.detailCell).kendoGrid({
可重定额:对,
可调整大小:正确,
数据源:{
运输:{
阅读:{
url:“http://localhost/x/api/Awards/directors/“+e.data.AwardTitleId,
键入:“获取”
},
创建:{
url:“http://localhost/x/api/awards/directors",
类型:“POST”,
数据:{
awardTitleId:e.data.awardTitleId,
personId:localStorage.personId,
nameId:localStorage.nameId,
isOnBallot:“True”,//我需要根据用户输入获取此值。,
concatenationString:“test1”,//我需要根据用户输入获取此值。
谁输入:0
}
}
},
模式:{
型号:{
id:“namefirstlast”,
字段:{
“namefirstlast”:{可编辑:true,键入:“string”},
“directorsequence:{可编辑:true,键入:“number”,验证:{min:1},
“isonballot”:{可编辑:true,键入:“boolean”},
“连接”:{可编辑:true,键入:“string”},
“更多姓名”:{
是的,
键入:“数字”,
验证:{min:0}
},
},
},
}
},
栏目:[
{字段:“namefirstlast”,标题:“Name”,编辑器:namesAutoComplete},
{字段:“directorsequence”,标题:“Director Sequence”,格式:“{0:n0}”},
{字段:“Isonbalot”,标题:“投票?”},
{字段:“连接”,标题:“连接”},
{字段:“更多名称”,标题:“更多名称?”,格式:“{0:n0}”},
{命令:[“编辑”],标题:“”,宽度:100}],
可排序:是的,
排序:{field:“namefirstlast”,dir:“desc”},
可编辑:“内联”,
工具栏:[{
名称:“创建”,
文本:“添加新董事/收件人”
}]
});
}
谁能帮我一把


谢谢

终于明白了

通过执行以下操作,可以从进行内联编辑的单元格中获取值:

save: function(a)
{
   var value = a.model.Item;
}
以下是全部代码:

save: function(a)
        {
            directorData["Operation"] = "I";

            if (!a.model.isNew())
            {
                directorData["AwardTitleId"] = awardTitleId;
                directorData["PersonId"] = a.model.PersonId;
                directorData["NameId"] = a.model.NameId;
                directorData["Operation"] = "U";
            }

            if (a.model.IsOnBallot == true)
            {
                ballot = 1;
            }

            if (a.model.IsOnBallot == false)
            {
                ballot = 0;
            }

            directorData["DirectorSequence"] = a.model.DirectorSequence;
            directorData["IsOnBallot"] = ballot;
            directorData["Concatenation"] = a.model.Concatenation;

            $.ajax({
                url: "http://localhost/Take3/api/awards/directors",
                type: "POST",
                dataType: "json",
                data: directorData
            }).done(function()
            {
                detailRow.find(".directorsOrRecipients").data("kendoGrid").dataSource.read();
                detailRow.find(".directorsOrRecipients").data("kendoGrid").refresh();

            });
        },