If you are looking at a grid demonstration using wx.grid.PyGridTableBase and related ones, you are right: this is really critical code. However, the key method:
def GetValue(self, row, col): return 'something'
The idea is that if you have data in
self.data = [[1,2,3,4], [5,6,7,8], ........ ]
then this will put your data in the appropriate cells:
def GetValue(self, row, col): return str( self.data[row][column] )
( self.data represents your database)
For other simpler examples using wx.grid.Grid with static data or with data for a MySQL database, you can check this and this
Method used to populate a cell with wx.grid.Grid:
mygrid.SetCellValue(row, col, databasevalue4rowcol)
source share