This encounter no matter how brief is always uncomfortable. I think its always in good gesture to if you can’t avoid seeing them to be gracious. If you don’t want to get into any heavy conversation to control the conversation and exit as soon as possible.
Also keep in mind the level of relationship. Dating someone may not necessarily mean that you were in a committed relationship. If that is the case, you may not have built up a strong enough relationship and that in itself can take the sting of the encounter down a bit. If this is someone you were in a committed relationship and they are an ex, it could get sticky. No matter who is at fault for ending things, you should remain calm, smile and again control the conversation. It’s perfectly fine to not have “time” to talk. This casual encounter should never to air out greivances unless both parties want to. It should be casual. If you see an ex or even someone you dated that caused you grief and you can’t be mature about it due to an issue that took place during your encounter together, its best to let them know that you would prefer that you keep it on a hi or a bye and then keep it moving.
Always know you are in control. Seeing someone that you haven’t seen may bring a plethora of feelings back but you are in control in how those feelings are managed. I have a few ex boyfriends and every time I control the tempo of the conversation and know that I am in control. I always remember that so when I don’t want to hear the mess that I left in the first place, I just roll. Now its easier since my kids are with me all the time. I have run into a few inside of a grocery store, and my kids are an automatic get out of a conversation card with just about anyone to be honest. With kids or no kids, you don’t owe anyone more time than your willing to give. Also know the encounter is going to linger inside of your head especially if very little conversation is had. I always hit the ex boyfriends with the basic, hey how are? How is your family? Let them ask me and then say it was nice to see you and roll. That’s really all it takes. Anything else and that means you wanted the conversation to linger. Turn the uncomfortable into a workable situation for you.
Also they may attempt to not see you in that case, you won. If they see you and decide to not have a conversation which is possible too, keep moving. Do not I repeat make the situation more uncomfortable. This goes for folks in a fresh breakup-give that person the space they and you need! Get out!