modified updateGrid to avoid checkbox issue