As Imam Al-Dardir explains in his commentary on the Mukhtasar of Imam Khalil, it is permissible to walk up to three rows to fill in the gap between rows during the prayer.
Written by Uthman Qureshi
Reference: Al Sharh Al-Kabir by Imam Ahmed Al-Dardir, 1/280-281
(أَوْ) (كَمَشْيِ صَفَّيْنِ) وَأُدْخِلَتْ الْكَافُ الثَّلَاثَةَ
