In a group setting such as the one you're describing, your friends are the ones who respect the privacy of both you and your ex. Chin up, no matter what. Just be you and be gracious.
Edited to add this thought: If you find yourself at the receiving end of personal questions about your relationship or your ex, you may wish to politely express something along the lines of "my ex has a right to privacy." Should the person continue to press, you could say something like, "You're asking me to overstep a personal boundary. It's not fair to discuss [insert ex's name] when he's not present."