You can read method code from objects at runtime, but you cannot write method code at runtime. I had a need for this, too, as I had wanted a generic grid, and put in DoubleClick code dynamically depending on the RecordSource for the grid. Darn.
Robert, remember you can add ANY class in run-time? Make your own class for grid column control(s). Put "this/parent.parent.eventDoubleClick()" in the DblClick event of control(s). Than add custom method to grid (eventDoubleClick), that will be called from controls. Thats all. When grid rebuilt by VFP, however, you will need to add custom controls again.
I did made excellent grid class with many features and never had a problem like 'adding of method code in run-time', except for column events. However, I do not need column events, because any action that cause column event also cause events somewhere else (header/grid), that may be used too.
[sig]<p>Vlad Grynchyshyn<br><a href=mailto:vgryn@softserve.lviv.ua>vgryn@softserve.lviv.ua</a><br>[/sig]