When looking at this photo, it may be imagined memories, when we were little, we may often do so, we sometimes even disturb our parents who are praying, is not it ? :)
Even the prophet Muhammad had ever prayed while holding his grandson, From Abdullah bin Shaddad, from his father, he said, "One day, Prophet Muhammad out for mid-day prayers or Asr. He was carrying Hasan or Husayn, and then he put the boy in front of him at will prayer, then making takbir. Then he bowed (sujud) for a long time. "
"I, says Ibn Shaddad," raised my head and then I saw him was in the back of Prophet SAW. I was again prostrated. Once completed, the companions asked, "O Messenger of Allah, were you prostrating so long, so we thought something had happened or revelations come down to you?"
The Prophet said, "Not so! Only, this grandson rise to the top of my back. And I do not want it down immediately until he was satisfied (at the back). "(Reported by Ahmad, Nasa'i, and Hakim).
Based on this information, the scholars allow the child to hold prayers. Imam Nawawi argues, the hadith above into the proposition for the Mazhab of Shafi and others who agree with him, that is allowed to bring and hold the children, both boys and girls or the other as a sacred animal.
Despite allowed, but every Muslim should notice things when the subject will take or hold the little boy. The first condition, the child must be in a state of purity, not wetting the bed or in an unclean/najis clothes, diapers contain impure, or unclean taxable wore sandals. So if your child is not sacred (unclean/najis taxable), carrying or holding the child in the prayer is not allowed.