Has the doctor tested her for Celiac disease? It is an intolerance to gluten which can be found in wheat, rye, barley and some other grains. It usually, but not always, leads to digestive problems. Kids fail to gain weight. Sometimes they also have skin problems like eczema. They may also have some behavior problems or have sleeping problems. There are MANY other symptoms.
Celiac is a genetic condition. Unfortunately, the testing for it often comes up negative until the disease has progressed and damage is done to the intestines. This damage prohibits the intestines from absorbing the nutrients the body needs. People will often become anemic or have other vitamin and mineral deficiencies. The damage will usually repair itself once the person goes on a gluten-free diet. This diet is the only treatment so far for this condition but it works!
It is a more common condition than doctors realize and it would be good to try to rule it out. Is it widely underdiagnosed because the testing is not always accuarate and doctors think it is rare so they refuse to test for it. Talk to your doctor! But remember, many doctors are very reluctant to test for this condition because they think it is rare. This is not true. READ, READ, READ! :) Afer discussing it with him/her, and hopefully getting your daughter tested, you may want to try a gluten free diet (you have to be REALLY sure you remove all the sources of gluten, which takes some research!) and see if you notice a difference.
Oops, almost forgot... I'm assuming you have already tried removing dairy from her diet?
Read about it online (search "celiac desease" or "gluten intolerance") and let me know if you need anything at all. I'd be happy to recommend some reading material and give you more information. Take care!