0

当我右键单击网格中的行时,我希望选中该复选框。我的应用程序仅支持 javascript。它不支持jquery。所以请用javascript发送你的答案。我使用以下代码来激活右键单击事件并获取我右键单击的行的 ID 值。请帮我检查相应行的复选框。

this.gridConnections.push(aspect.after(this.grid, "onRowContextMenu", lang.hitch(this, function(evt) {

            var rowID = evt.rowId; 
            console.log("right click"); 
            event.stop(evt);
        }), true));
4

1 回答 1

0

拥有行对象后,您还可以获得该行上的复选框,例如 this.yourcheckboxdijit.byId("yourcheckbox")。然后使用

this.yourcheckbox.set("checked",true)或者

dijit.byId("yourcheckbox").set("checked",true);
于 2017-07-21T19:51:19.627 回答