One of my boys is more sensitive to becoming constipated than the other one, so people's systems can be different. What have we learned?
Too much cheese, yogurt and banana can cause constipation. When we notice he's had a lot of this in his diet, we know it's time to balance it with extra fiber. We buy cereal that's rich in fiber. We also make sure he gets lots of fruit. Prunes, apples and grapes have lots of fiber.
I went to our doctor's webiste and followed a link that listed foods rich in fiber. We also have a bottle of miralax, but we've only used it 2 times and our son is 5 1/2 so we really have been able to control it with diet.
Food rich in fiber and lots of good fluids should do the trick. If they don't, I would try and keep a log of everything he's been eating and drinking for a few days or a week and talk to your ped. Maybe he's still not getting enough fiber, but if he is it should help your ped figure out whether it's something more than that.
Good luck! It's so hard to watch little ones as they struggle with this.