Is your RadGrid nested inside any other control? If so you this error can occur once you directly try to access the nested Grid.
I have found a couple of forum links which discusses a similar error. Go through it and see if it helps.
Name 'RadGrid1' is not declared.
Name:RadGrid1 is not declared