Hi Aauniverse,
I have cross checked your code there is no such error at my end in your code. Your code is working without any error.
So please put break point on OnRatingChange event and check the below line of code.
Are you getting GridViewRow or not?
((sender as Rating).NamingContainer as GridViewRow)