If I got your attention your probably somewhere between desperate for solutions for your horribly behaved child to mildly interested in learning some parenting tricks to have at the ready for the next time your sweet angel thinks she's in charge at the grocery store. Either way, by the time you've finished this article you'll have 3 new solutions!
1. Assume nothing. I believe that your child does remember, for the most part, what behaviors you expect from them at the store, grandma's house, church, etc. However it can be unpleasant to find your child acting-out when you least expected it. Instead, I suggest upon entering a situation that usually involves some acting-out from your child, take the time to briefly, but clearly, review what you expect from them. This accomplishes 2 things. First, your child can't use any silly excuses that he didn't know he couldn't dangle the cat out of the second story window of his best friend's house. And second, he knows, you know, that he knows. You know? This phenomenon is also called ACCOUNTABILITY.
2. Less can certainly be more. Now let's say your child still decides to act up. It's very easy to find yourself repeating directions to your kids after they have already "acted-out", however, as you may have already discovered this isn't always the most effective method of changing behaviors. One of the reasons it isn't so effective is because if your child is already wound up, a verbal barrage from the parent can act to overload the child making it less likely they will correct their behavior. The second reason it isn't so effective is that you might find yourself threatening consequences that there's no chance you'll actually follow through on ("I swear, I'll take your super-small-gaming-device away for a MONTH!"). So instead, calmly tell your child ONE time what you expect from them ("stay with me, quite voice, hands to your self, or use kind words, etc.") and then implement any consequence it is you want to (that you KNOW you will be able to follow through on). They don't even need to know what your planning. You have my permission to drop that bomb in the car and turn up your radio! When they want to argue with you later about how "that's not fair you didn't tell me you were going to punish me" please let that fall on deaf ears.
3. Think like a real estate agent "location, location, location!". Have you every felt like you've lost your cool or reacted to your child's behavior in ways that are confusing even to you? Did this occur when you were out in the community, had guests over, or were celebrating a special event? The it's possible your child was using your "audience" against you. Children can do some pretty amazing things subconsciously. Please understand, I'm not suggesting your child is some master-manipulator, but I am proposing that your child is picking up on weaknesses or differences in her environment. If you've let your child stay up later when you've had friends over, given them extra chances when you've been distracted with your other household responsibilities, or not followed through with a stated consequence for acting up when you were at the amusement park, your child has filed all of that information away and has probably deduced that when others are around you back down! Remove any opportunity for your child to manipulate you because there happens to be an audience! First, ask yourself where you feel vulnerable or judged as a parent, and be extra ready to respond to acting out. Take them to the car to review expectations, be ready to ask your guests to leave, or abandon the activity all together so that you can follow through with the appropriate consequence. Second, recognize your child's behavior is not a reflection of you, it's a reflection of them. Get rid of your guilt! Lastly, know that you can make accommodations and let things slide whenever you want to its just going to take a bit more work to get back on track.
Happy parenting!

Author's Bio: 

Nancy Cummings is founder and Senior Behavioral Consultant at Cummings Consulting. Nancy has more than 10 years experience teaching families and educators how to use behavior modification to improve their children's problem behaviors. The most rewarding result from the work that she does is seeing the parents transform from angry, irritated, and overwhelmed to confident, relaxed, and "in charge."
She lives in Pennsylvania with her husband, Owen , and their 2 year old son, Adam.