2013-10-06 52 views
0

我使用kendo層次網格。在子網格中,我放置了一個「編輯」按鈕。所以當我點擊編輯按鈕時,我需要獲得子行第一列數據(ID)。在kendo層次網格的子網格中獲取第一個單元格數據

我的detailInit函數和clickb函數在這裏。

 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); 

} 

回答

相關問題