I’m trying to test the sprit of this idea by creating the required number of rows, with a class instance in the rowtag of each row. Amongst other things, the class contains an id so I can get the data for each row from a database. So now, I’m doing all the writing into the cells inthe CellPaint Event.
For a couple of the columns, I’m using
g.drawpicture() to put a small image into a cell, but for most of the columns I’m just writing into them, doing such as
me.CellvalueAt(row, col) = "a string of text". At the same time I’m writing into various columns’ celltags with values to be used for sorting. For example, there’s a column showing the date in human-readable form, but the sort value (seconds since the epoch) is stored in the celltag.
Now this is giving me trouble. It seems that the CellTextPaint event only fires for column zero; all other columns are blank. I checked in the debugger that the event doesn’t fire for other column values.
Is there some fundamental reason that prevents writing to cell value or cell tag, inside the paint event?