Both are all right (my preferred spelling), though they mean something different. In #1, the speaker does not know whether 'he' is all right. In #2, the speaker knows that 'he' is all right, and is expressing surprise at this, in a rather old-fashioned way.
:up: (But the second interpretation is less likely in the case mentioned in the title. 'I wonder that it's grammatical' could be said of a student whose grammar is usually wrong, who suddenly says something grammatical! ;-))