0
按鈕,我已經爲在DataGrid有史以來排將按鈕添加以下代碼:ID在數據網格
structure: [
{field: 'msConstId', width: '0%', name: 'Milestone',hidden: true},
{field: 'edit', width: '8%', name: 'Edit',formatter: function(data, rowIndex) {
return new dijit.form.Button({style: "width: 80px;",label:"Edit", iconClass:"dijitIconEditTask",showLabel:true, onClick:function(){ updateMilestone.show(); populateUpdateControls(); }});
}},
{field: 'delete', width: '10%', name: 'Delete',formatter: function(data, rowIndex) {
return new dijit.form.Button({style: "width: 80px;",label:"Delete", iconClass:"dijitIconDelete",showLabel:true, onClick:function(){ deleteMilestoneDialog(); }});
}}
]
的問題是,我想要的ID分配給每個按鈕爲「editBtnRowIndex」和「deleteBtnRowIndex」。我想使用ID來啓用和禁用特定網格行中的按鈕。
這可能嗎?