Sort the icons by row and col