biting dog for no reason

My goldendoodle will be 3 next month. I've had him 5 mos. now. He came from a family of 4 kids, never bit them but did put 3 stitches in a neighbor 7 yr old. I can't have a biting dog. Never in my life have I had a dog bite me. He was playing boss, wouldn't get off my bed. I went to grab his collor to put him off and he growled and bit me in a sec. Broke the skin in 2 places. I'm 65, have had dogs all my life. I'm at my wits end. I have 3 little guys across the street. He has shown his teeth to folks who come in to my house...especially when he is pet on his head.

If anyone can give me some advice..I love this guy and he can be so loving..I don't get it. No reason to bit my 18 year old grandson also..while he was petting him.

Help! I cannot in good conscience give him up to someone else and take the risk of his biting someone. The thought of laying him to rest is heartbreaking. His previous owners were threatened with a lawsuit if they didn't get rid of the dog. So I took him. Sight unseen.
I want to add his schedule has been interrupted and lots of folks have come and played with him but I have not been able to. Its temporary.
Help Sam