Helping Children Understand "Good" vs. "Bad" Secrets
Never assume that private information will be kept secret with young children. Preschool teachers around the world have heard more information about parents' personal habits (hygienic and other!) and behavior than you can imagine. While you must have been disappointed that your mother learned about the surprise, it is not unusual for a preschool-aged child to spill the beans. Exciting ideas breed excitement, and it is fun to share exciting news!
Rather than focus on the spoiled surprise, which is really at the heart of the matter, you can learn from this experience and talk to your child about sharing information.
Your instinct about wanting to foster open and honest communication within your family is wonderful. Children of this age are starting to learn that they can indeed keep information secret. They can choose to share feelings, ideas or stories with others, or not. This is very empowering for young children, and something to be discussed.
You can use simple language to explain to your daughter that you will always keep her safe. She should tell you when she feels happy or sad, angry or afraid, and you can talk about these feelings. There may be times when she feels embarrassed or shy about her feelings, and this is perfectly OK.
Other information (that doesn't compromise someone's safety) can be kept secret, such as a surprise. You can try to explain, "We will tell grandma about the surprise tomorrow, but please don't talk about it today." You'll have to hope for the best, because any information may be too much to keep to herself, and that is simply a developmentally appropriate reality.
Another thing to consider is, what are the actions of others in terms of trying to get information out of a child? Some grown-ups are all too aware of children's inability to keep information secret, and will use this to their advantage. For example, asking your child, "Did you see Daddy buy me a birthday present? What is it?" is somewhere between fishing and manipulation. Open conversation about what is appropriate to share and what can be kept secret is fundamental, and will develop over time as you explore the boundaries together.