FormControlEditLink Control Not assigned Error

I have a page control which has a TAdvStringGrid on one of the pages in design time. The pages are then generated dynamically at runtime when a user logs in and cleared (freed) when he logs off. I also have FormControlEditLink which has the Control property assigned in designtime to a panel that contains some controls and this is used in the cells of one of the columns in the grid as an inplace editor. When I start the program and login, the inplace editor works fine. However; when I log off and then log in again; and then click on one of these cells; I get this error message:

       FormControlEditLink control not assigned

How can I fix this error?

The FormControlEditLink.control became not assigned because the Control that was assigned to it was freed when the grid was freed. The StringGrid becomes the parent of the control once the in-place-editor is shown in the grid.

I have fixed this issue by setting the parent of the control to Self before freeing the grid, that way it doesn't get freed when the grid gets freed

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.