Dojo datagrid中按钮的id

Dojo datagrid中按钮的id,dojo,dojox.grid.datagrid,Dojo,Dojox.grid.datagrid,我有以下代码用于在DataGrid的任何一行中添加按钮: 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

我有以下代码用于在DataGrid的任何一行中添加按钮:

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来启用和禁用特定网格行中的按钮


这可能吗?

我必须通过查看其他字段中的数据并禁用该行的按钮来解决此问题,方法如下:

var rowdata = grid.getItem(rowIndex);
rowIndex作为参数传递给格式化程序函数

var val = rowdata.myRowID;
if(val=='specific value') {
   //return disabled button
} else {
   //return enabled button
}