deletion based on the grid variable instead of DOM, because performance