Setup line numbers for grid items