Hi,
There are forms that are displayed modally, but usually they're not modal. In the specific example, the grid is loaded using a method call from outside the form, that is how we use it as well.
1. A user clicks on a button on another form (menu)
2. a new form is opened
3. the grid receives data, usually through a recordset
4. the form is displayed (either as the main content, but the menu is still available or as a modal window (a search window))
5. initially the custom content is drawn.
6. a user clicks in the grid
7. an event is fired, that might affect the contents. Therefore, somewhere along the line the beginupdate call is used on the grid
8. assumption: starting from beginupdate, until endupdate is called, all instances of aftercellcustomdraw are ignored.
9. some or all of the custom content in the cell disappears.
The grid appears when loading the form, but the beginupdate may be called from a number of events, inclusing mouseevents, clickevents, timerevents... I think most of those are used in the application a a whole.
I still need some more time to create a stripped database containing something more of a real-word example, though I still think the previous example is quite thorough already and close to reality.
Thanks for your thoughts thus far,
paul