Atozed Forums
IWGrid.Clear Frees objects in control field? - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: IWGrid.Clear Frees objects in control field? (/thread-159.html)



IWGrid.Clear Frees objects in control field? - luis.j.gutierrez@inn2.cl - 05-08-2018

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?


RE: IWGrid.Clear Frees objects in control field? - Alexandre Machado - 05-08-2018

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.


RE: IWGrid.Clear Frees objects in control field? - ScottWGast - 05-10-2018

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


RE: IWGrid.Clear Frees objects in control field? - luis.j.gutierrez@inn2.cl - 05-13-2018

Thanks for all your replies and help!!!