私は剣道階層グリッドを使用しています。子グリッドに「編集」ボタンを配置しました。したがって、編集ボタンをクリックすると、子行の最初の列のデータ (ID) を取得する必要があります。
私の detailInit 関数と clickbfunction はこちらです。
function detailInit(e) {
var _Po_sectionID =e.data.SectionID;
$("<div/>").appendTo(e.detailCell).kendoGrid({
dataSource: {
transport: {
read: _PostionsBySectionUrl + _Po_sectionID
},
schema: {
data: "Data",
total: "Count"
},
},
scrollable: false,
sortable: true,
pageable: true,
{ field: "ContainerID", title: "Possition ID",hidden:true },
{ field: "ContainerName", title: "ContainerName",hidden:true },
{
title: "Action", width: 95, command: [
{
id: "edit",
name: "edit",
click: OnPositionRowSelect,
template: "<a class='k-button k-grid-edit' href='' style='min-width:16px;'><span class='k-icon k-edit'></span></a>"
}
]},
]
});
}
最初の行のセル データを OnPositionRowSelect 関数に子にする方法を教えてください。
function OnPositionRowSelect(e) {
e.preventDefault();
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _
alert("Container Id : "+ ContainerID);
}