First, I try to ensure that the child has their needs (sleep, food, needing connection/attention) met reasonably. Sometimes, acting up in this way is a bid for attention. But generally, if those are met-----
When my kiddo is getting grumpy or contrary, I STOP giving him any forewarning of what's going to happen. It's only an invitation for complaint.
Instead of "Let's go to the store." it's "Put your shoes on now. Come on outside." ("I don't want to go outside!" --I ignore this. It is just a matter of fact that We Are Going Outside.) "Come with me now." and we walk to the store.
Strollers are really helpful in those situations. :) Put'em in and ignore them. A stroller would have been helpful for you today.
I do a lot of *selective* ignoring when the kids whine about something that can't be changed. I had a stick-in-the-mud kid in one of my preschool groups early on and discovered that the more I tried to reason with them, the worse/more whiny/crying the behavior got. Once I had decided that giving a choice whenever possible (you don't have to play ball with us, you can sit under that tree) was the best I could do in this sort of situation, I just ignored the complaining. Want to be a sourpuss? Go for it... but don't expect us to get sucked into your drama. As time went on, I noticed that the less attention I gave to the complaining (no correcting the attitude), the faster that child was able to get over themselves. As soon as their attitude changed or the topic of conversation was not a complaint, they got my attention.
I am also a big fan of letting family know (discreetly, of course, and in advance) when I have a cranky-pants on my hands. Then they won't take it personally. But I certainly don't spend any time trying to talk an obstinate child into having fun if they're digging their heels in.
And if you are worried about the other children, here's the thing: you get to set the example. "Kevin has decided he doesn't want to have fun right now, and maybe he'll change his mind later. But WE can still have a great time." Try to teach them to ignore annoying people-- it's a life skill, really. (I do this with preschoolers too... "Oh, Sarah doesn't feel like company right now. You can go play and she'll come tell you when she's ready." ) If the whining happens at home, send the child to their room until they can use their 'regular voice' or can tell you what they need.