My daughter, now 5, used to have horrible, horrible constipation where she wouldn't go for days. She had a great diet already (without bananas and applesauce), but I tried everything from huge quantities of fruits that started with "p", milk of magnesia, cornsyrup, remedies from the healthfood store, glucose mixes, suppositories etc. etc. etc. (all on advice of pediatrician, friend who is pediatrician, and talking to other mothers)
I finally took her to a gastroenterologist who prescribed Miralax for her. (1Tbsp/day dissovled in 6 oz juice. Reduce as bowel movements become more frequent.) You can now buy Miralax over the counter, but it was a miracle for us. I have no idea how many nights we would both be up crying because she would hold my hands as she finally passed #2.
The gastroenterologist explained that if you hold in poo, your colon actually expands. If your colon expands, the poo gets dehydrated and is harder for the child to pass. The colon also takes longer to fill so it doesn't signal the body that it needs to be eliminated, so you have a double edged sword. Whatever you find that works, make sure you use it for several days in a row until she is having at least one normal (not dried out) bowel movement per day (for at least 4-5 days). This will help the colon go back to its normal size.
Good luck!!