gopika suku
gopika suku

Reputation: 1

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

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

Upvotes: 0

Views: 260

Answers (1)

bajji
bajji

Reputation: 1291

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

Upvotes: 0

Related Questions