If Eric had written "Are you a student?" or something similar instead of "What grade are you in?" perhaps his intent might have read better.
But it's easy to dissect the intent of others after the fact. Best to chalk it up to a simple misunderstanding and move on.