controls/CustomTable.py
changeset 662 3c4e0d4f7a61
parent 606 d65122c61eaf
child 684 f10449b18dbe
equal deleted inserted replaced
661:7891872e6fd7 662:3c4e0d4f7a61
    67     def ResetView(self, grid):
    67     def ResetView(self, grid):
    68         """
    68         """
    69         (wx.grid.Grid) -> Reset the grid view.   Call this to
    69         (wx.grid.Grid) -> Reset the grid view.   Call this to
    70         update the grid if rows and columns have been added or deleted
    70         update the grid if rows and columns have been added or deleted
    71         """
    71         """
       
    72         grid.CloseEditControl()
    72         grid.BeginBatch()
    73         grid.BeginBatch()
    73         for current, new, delmsg, addmsg in [
    74         for current, new, delmsg, addmsg in [
    74             (self._rows, self.GetNumberRows(), wx.grid.GRIDTABLE_NOTIFY_ROWS_DELETED, wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED),
    75             (self._rows, self.GetNumberRows(), wx.grid.GRIDTABLE_NOTIFY_ROWS_DELETED, wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED),
    75             (self._cols, self.GetNumberCols(), wx.grid.GRIDTABLE_NOTIFY_COLS_DELETED, wx.grid.GRIDTABLE_NOTIFY_COLS_APPENDED),
    76             (self._cols, self.GetNumberCols(), wx.grid.GRIDTABLE_NOTIFY_COLS_DELETED, wx.grid.GRIDTABLE_NOTIFY_COLS_APPENDED),
    76         ]:
    77         ]: