code: def OnInsertTabs(self, event):
          
  
          with undo.group(_("Insert table")):
              self.grid.actions.insert_tabs(self.grid.current_table - 1, 1)
  
          self.grid.GetTable().ResetView()
          self.grid.actions.zoom()
  
          event.Skip()
docs: Insert one table into grid