Add class on row by modifying view.tpl.php file
I tested it out, and it didn't work for me....until I cleared the cache! 

Just go to yoursite.com/admin/config/development/performance/ and click "clear all caches".

Update: since clearing the cache didn't work, check if you are editing the right file: delete all the code in the tpl.php file. 


If the view disappears, you are editing the right file.
If it still shows, close your editor window and select the file again.