1. Riding a bike is great fun.

2. It is great fun to ride a bike.
3. It is great fun riding a bike.
-------------
Are they all the same in meaning and grammatical?

All are technically correct and mean the same thing, but #3 is a bit awkward.

Yes, all three sentences have the same meaning and are grammatically correct. They all convey the idea that riding a bike is enjoyable.

The first sentence, "Riding a bike is great fun," uses the present simple tense to state a general truth or fact about bike riding. It is a straightforward statement expressing that bike riding is a fun activity.

The second sentence, "It is great fun to ride a bike," uses the infinitive form "to ride" to indicate the action of riding a bike. The use of "to ride" suggests that the speaker is emphasizing the enjoyment one experiences when engaging in the activity of riding a bike.

Lastly, the third sentence, "It is great fun riding a bike," uses the present participle form "riding" to describe the ongoing action of bike riding. This form implies that the speaker is actively engaged in or has personal experience with riding a bike and finds it enjoyable.

In terms of meaning and grammar, all three sentences effectively convey the idea that bike riding is highly enjoyable.