code: def onSave(self, event, alert=False, destroy=True):
          
          # tidy up drop_down menu
          if self.drop_down_menu:
              self.drop_down_menu.clean_up()
          # then save actual data
          self.grid_builder.save_grid_data()
          if not event and not alert:
              return
          # then alert user
          wx.MessageBox('Saved!', 'Info',
                        style=wx.OK | wx.ICON_INFORMATION)
          if destroy:
              self.Destroy()
docs: Save grid data