You're certain that the wValue property is supported for your grid type?
Also, since you're using JavaScript, couple of things:
1) Always a good idea to put parenthesis around the different clauses in your IF statement to make sure things are properly evaluated.
2) Try using aqConvert.VarToStr instead of the String method
So... change your if statement to something like:
if((aqConvert.VarToStr(Grid.wValue(i,1))== "500322") && (aqConvert.VarToStr(Grid.wValue(i,2))== "COUNTRY") && (aqConvert.VarToStr(Grid.wValue(i,3))== "TEST") && (aqConvert.VarToStr(Grid.wValue(i,4))== "Canada"))