code: def on_close_grid(self, event):
          
          if self.parent.grid_frame:
              self.parent.grid_frame.onSave(None)
              self.parent.grid_frame.Destroy()
docs: If there is an open grid, save its data and close it.