code: def toggle_ages(self, event):
          
          if self.grid.changes:
              self.onSave(None)
  
          label = event.GetEventObject().Label
  
          self.er_magic.age_type = label
          self.grid.Destroy()
  
          # normally grid_frame is reset to None when grid is destroyed
          # in this case we are simply replacing the grid, so we need to
          # reset grid_frame
          self.parent.Parent.grid_frame = self
          self.parent.Parent.Hide()
          self.grid = self.grid_builder.make_grid()
          self.grid.InitUI()
          self.panel.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.onLeftClickLabel, self.grid)
          self.grid_builder.add_data_to_grid(self.grid, self.grid_type)
          self.grid_builder.add_age_data_to_grid()
          self.drop_down_menu = drop_down_menus.Menus(self.grid_type, self, self.grid, None)
          self.grid.SetColLabelValue(0, 'er_' + label + '_name')
          self.grid.size_grid()
          self.grid_box.Add(self.grid, flag=wx.ALL, border=5)
          self.main_sizer.Fit(self)
          if self.parent.Parent.validation_mode:
              if 'age' in self.parent.Parent.validation_mode:
                  self.grid.paint_invalid_cells(self.parent.Parent.warn_dict['age'])
                  self.grid.ForceRefresh()
          # the grid show up if it's the same size as the previous grid
          # awkward solution (causes flashing):
          if self.grid.Size[0] < 100:
              if self.grid.GetWindowStyle() != wx.DOUBLE_BORDER:
                  self.grid.SetWindowStyle(wx.DOUBLE_BORDER)
              self.main_sizer.Fit(self)
              self.grid.SetWindowStyle(wx.NO_BORDER)
              self.main_sizer.Fit(self)
docs: Switch the type of grid between site/sample
          (Users may add ages at either level)