AD
Administrator
Syncfusion Team
July 29, 2005 08:09 AM UTC
This behavior is by design. You add the cellmodel to the grid (grid.CellModels actually). So, it is the grid that owns teh cellmodel (and the corresponding cellrenderer). You could choose to use the celltype in more than one row, so just removing a row does not tell the grid to get rid of teh custom cell type.
One thing you could do is to move your disposable resources from the renderer to the cellmodel class. You could make them internal, and access them in your renderer from this.Model. Then you could handle the cellModel.Dispose to dispose them. You should remove the cellmodel from grid.CellModels before you dispose it after deleting your row.
MM
Michael Mann
July 29, 2005 08:22 AM UTC
Hi,
that does make sense. Thinking about your answer I have to admit, that my approach is getting wrong. I only want to get sure, that resources of my cell type are released when a row with that cell type is deleted.
Thanks for your fast reply
Michael