parameters: (self, grid)
docstring: (Grid) -> Reset the grid view.   Call this to
          update the grid if rows and columns have been added or deleted
docstring_summary: (Grid) -> Reset the grid view.   Call this to
          update the grid if rows and columns have been added or deleted
docstring_tokens: ( Grid ) - > Reset the grid view . Call this to update the grid if rows and columns have been added or deleted
function: def ResetView(self, grid):
          """
          (Grid) -> Reset the grid view.   Call this to
          update the grid if rows and columns have been added or deleted
          """
          grid.BeginBatch()
  
          for current, new, delmsg, addmsg in [
              (self._rows, self.GetNumberRows(), Grid.GRIDTABLE_NOTIFY_ROWS_DELETED, Grid.GRIDTABLE_NOTIFY_ROWS_APPENDED),
              (self._cols, self.GetNumberCols(), Grid.GRIDTABLE_NOTIFY_COLS_DELETED, Grid.GRIDTABLE_NOTIFY_COLS_APPENDED),
          ]:
  
              if new < current:
                  msg = Grid.GridTableMessage(self,delmsg,new,current-new)
                  grid.ProcessTableMessage(msg)
              elif new > current:
                  msg = Grid.GridTableMessage(self,addmsg,new-current)
                  grid.ProcessTableMessage(msg)
                  self.UpdateValues(grid)
  
          grid.EndBatch()
  
          self._rows = self.GetNumberRows()
          self._cols = self.GetNumberCols()
          # update the column rendering plugins
          self._updateColAttrs(grid)
  
          # update the scrollbars and the displayed part of the grid
          grid.AdjustScrollbars()
          grid.ForceRefresh()
function_tokens: def ResetView ( self , grid ) : grid . BeginBatch ( ) for current , new , delmsg , addmsg in [ ( self . _rows , self . GetNumberRows ( ) , Grid . GRIDTABLE_NOTIFY_ROWS_DELETED , Grid . GRIDTABLE_NOTIFY_ROWS_APPENDED ) , ( self . _cols , self . GetNumberCols ( ) , Grid . GRIDTABLE_NOTIFY_COLS_DELETED , Grid . GRIDTABLE_NOTIFY_COLS_APPENDED ) , ] : if new < current : msg = Grid . GridTableMessage ( self , delmsg , new , current - new ) grid . ProcessTableMessage ( msg ) elif new > current : msg = Grid . GridTableMessage ( self , addmsg , new - current ) grid . ProcessTableMessage ( msg ) self . UpdateValues ( grid ) grid . EndBatch ( ) self . _rows = self . GetNumberRows ( ) self . _cols = self . GetNumberCols ( ) # update the column rendering plugins self . _updateColAttrs ( grid ) # update the scrollbars and the displayed part of the grid grid . AdjustScrollbars ( ) grid . ForceRefresh ( )