apply grid to indexMain