CustomDataTable DeleteRows function

Hello!

      I started to play with the CustomDataTable(wxPyGridTableBase)
class can be found in the GridCustTable.py demo example file. The
following rudimentary DeleteRows function was added to this class:

    def DeleteRows(self, row, numRow):
        self.data.pop(row)
        msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 1)
        self.GetView().ProcessTableMessage(msg)

It works fine, deletes duly the apropriate row, but there is a small
problem: A new empty row is appended to the end of the gridtable. How
can I prevent this event? I couldn't fine any information about it.

Thanx

Peter