文法上
Meanings
1
noun which may take the genitive case particle 'no'
grammatical
Used as a no-adjective to modify nouns, meaning 'relating to grammar' or 'in terms of grammar'.
This sentence has a grammatical error.
2
grammatically
Adverbial use, often with に or as a standalone adverb, meaning 'from a grammatical standpoint'.
Grammatically, this expression is incorrect.