>>>>Where did you put the code?
>>>
>>>In the CustomClass.INIT
>>
>>Mmm, I thought that putting the code in the init of the custom would not work, but it seems to work (in my test) anyways, although I believe is not a good place to put it for you can not be sure the grid is properly initialized at that point, what happens if you move the bindevent to the init of the form instead?
>
>That's one of the issues. This is a custom class that is just meant to reside at the same level as a grid. Not form-dependent at design time.
Then move it to their common parent's .init() - so both the source and the handler (your grid and your custom) have their inits finished by the time the bindevent() is issued. You can't bind events from or to objects which don't completely exist yet - and the definition of "exist" is "init returned .t.".