How to select a checkbox in a gridx grid using row id?

258 Views Asked by At

I want the checkbox to be checked when I right click on the row in the grid. My application supports only javascript. It does not support jquery. So please send in your answers in javascript. I used the following code to activate the right click event and get the ID value of the row that I have right clicked on. Please help me to check the checkbox of the corresponding row.

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

There are 1 best solutions below

0
bajji On

once you have the row object, you can also get the checkbox on that row like this.yourcheckbox or dijit.byId("yourcheckbox"). Then use

this.yourcheckbox.set("checked",true) or

dijit.byId("yourcheckbox").set("checked",true);