No one is saying "grammar is not in written languages". What we're saying is that since all languages have grammar, and since most languages have no writing systems, it follows that writing is not intrinsic to grammar.