Added listener to the grid view