Saaiduna Ibn Umar Radiallahu Anhu narrates that the Prophet of Allah Sallallahu Alahi Wasalam said; “Straighten the rows! Align your shoulders with each other’s; fill the gaps and be soft to your brother’s hand, do not leave an empty space for shaitan within the rows. Whoever joins the rows, Allah will join him. Whoever, breaks the rows, Allah will break him.” (Sunan Abi Dawud p.97 v.1)
Saaiduna Numan Bin Bashir Radialahu Anhu reports that the Prophet of Allah Sallallahu Alahi Wasalam used to straighten his companions rows for the prayer like a straight arrow. One day he was about to start the prayer when he noticed a man’s chest protruding outside the row and He Sallallahu Alahi Wasalam said; “Servants of Allah! You either straighten your rows, or Allah would cause your faces to differ.” (Sahih Muslim)
It is stated that Saaiduna Umar Radiallahu Anhu would designate someone to make sure that the rows are straightened. The takbir of the prayer would not start unless he was informed that all the rows were straight. Similarly, Saaiduna Uthman Radiallahu Anhu and Saaiduna Ali Radiallahu Anhu would instruct people to either move forward or back when checking the rows. (Sunan Tirmizi p.53 v.1)
From the aforementioned ahadith we can derive the importance of straightening the row and that the Prophet of Allah Sallallahu Alahi Wasalam would make sure that the rows are straight before commencing the prayers.
It is not mentioned proven that the Prophet of Allah Sallallahu Alahi Wasalam said the salam prior to the commencement of the salah.