Grid render logic