Atozed Forums

Full Version: IWGrid.Clear Frees objects in control field?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using Intraweb 14.2.7 and I have a question. When I use IWGrid, I create some buttons using the control field. When I use IWGrid.Clear, ir frees the object assigned to Control?
Hi Luis

No, it doesn't. The IWGrid.Clear frees all grid cells, but during TIWGridCell.Destroy the control is not destroyed. However, if TIWGridCell is assigned to some control, the control will no longer be parented to the grid, but its parent becomes NIL.
I learned the hard way... you gotta iterate through all of the cells and destroy the controls first.

Good thing is... it's a simple thing to do Smile
Thanks for all your replies and help!!!