Added option to show a close button on the grid