Set value of checkbox on grid.

I have a grid use #master_checkbox. I want to check one row on grid, all rows have same value in column(ID) will be check. Ex: I check row has IndenCode=2, all rows have IndenCode=2 will be check. How to code it?

Please, try to use something similar:

[code]mygrid.attachEvent(“onCheck”, function(rId,cInd,state){
chValue=mygrid.cells(rId,column_Ind).getValue(); // get the value in the needed column (IndenCode=2)
mygrid.forEachRow(function(id){ // iterate through the rows comparing the saved value with the current iterating row
curValue=mygrid.cells(Id,column_ID).getValue();
if (chValue==curValue){
mygrid.cells(Id,cInd).setValue(state);
}
});

});[/code]