Pedialyte is an oral electrolyte (salt) solution used to provide fluid, glucose and sodium in the proper amounts. In the initial severe phase of a diarrheal illness, Pedialyte is a useful fluid to use to help prevent dehydration.
There are some foods that seem to help with "binding" up the excess fluids and waste that occur with diarrhea. You mention one of them, bananas. Others are applesauce, rice, potatoes, and toast. The starch in these foods seems to help with slowing down the stools. Things that tend to promote diarrhea are foods that are generally high in sugar or fat content. Sweetened juices and meat dishes should be avoided. You may want to also hold off on whole milk for 24 hours or so, as the high fat and protein content of the milk may make it difficult to digest.
Over-the-counter medications to manage diarrhea are not recommended for young children.