I have a grid that uses a custom table derived from PyGridTableBase (wxPython 2.8, Python 2.6, Windows XP). After I call SetTable(table, True), everything is fine and the data is displayed correctly. At a later time though, I do an operation that will update the table data, which should cause the grid to have more or fewer rows. The problem is, the grid never tries to read the column and row count from the table at any time after the initial SetTable call. I have tried reading the docs, and also the following corrective measures:
* grid.ForceRefresh - No effect
* SetTable(table, True) - Crash
I have a grid that uses a custom table derived from PyGridTableBase (wxPython 2.8, Python 2.6, Windows XP). After I call SetTable(table, True), everything is fine and the data is displayed correctly. At a later time though, I do an operation that will update the table data, which should cause the grid to have more or fewer rows. The problem is, the grid never tries to read the column and row count from the table at any time after the initial SetTable call. I have tried reading the docs, and also the following corrective measures:
* grid.ForceRefresh - No effect
* SetTable(table, True) - Crash
Any Ideas?
Your table needs to send messages to the view (the grid) that informs it of rows or columns being added or removed. See GridCustTable.py in hte demo. There are also some samples in the wiki.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I have a grid that uses a custom table derived from PyGridTableBase
(wxPython 2.8, Python 2.6, Windows XP). After I call SetTable(table,
True), everything is fine and the data is displayed correctly. At a
later time though, I do an operation that will update the table data,
which should cause the grid to have more or fewer rows. The
problem is,
the grid never tries to read the column and row count from
the table at
any time after the initial SetTable call. I have tried reading the
docs, and also the following corrective measures:
* grid.ForceRefresh - No effect
* SetTable(table, True) - Crash
You need to do the following, where self is your Grid -