grid auto line count on resize