A "compliment" can absolutely be condecending- depending on tone, time, place, and phrasing. I've had men compliment me on things that they'd *never* compliment a man on, and it's rubbed me rather the wrong way "YOU can change a tire? Awesome"....why is that awesome? Would it be awesome if you saw a man do it? My husband gets the same thing from women "You change diapers? That's so nice you help your wife".... he's a parent too, why shouldn't he?
Getting a compliment like the one the OP did would make me feel like the person thought they were "above" me to be handing out praise like that- it smacks of boss/employee or parent/child interaction (you handled that perfectly- here's a gold star!). It's much better to simply say "What a well behaved child" or "Your kids were so good during dinner", or "what nice manners".
Direct the comment as a pleasant observation about the kid/children- not an appraisal or evaluation of the parent. The former just seems like you noticed a positive attribute, the latter feels like you were under judgement or evaluation.