Updated the grid column logic