I solved the problem by adding the Form variable to the grid as Form1.grdi1 and all works just fine.
Why I need the form variable in the code for the Form class itself, I don't understand, but thanks for the replies, they at least got me thinking.
Regards, Walt