changed grid is constructed to table to enable adding listeners for cells