How do I tell my child his grandparent just died without warning?

Honest and simple. Kids understand death differently at various ages, and for the most part handle it better than adults. Answer their questions honestly , but don´t "over answer", let them know what what will come next .Kids need reassurance that their life will continue as they know it as much as possible, and that nothing they did caused their grandparent to die. Let him decide if he wants to go to to the funeral.
Gently. Depending on age of child, need to share a bit about life and death using age appropriate discourse. You may want to speak to your child's pediatrician who may assist you with this very important fact of life.