Which one is grammatically correct: Having a dinner or having dinner?
Both may be grammatically correct but they would mean different things.
having a dinner
In this case "a dinner" refers to an event.
The family agreed that having a dinner at a fancy restaurant was the best way to celebrate grandma's one hundredth birthday.
In this case "having dinner" refers to the act of eating.
We were having dinner when the police arrived.