Hi,
I have this method:
private void grid_InitializeRow(object sender, InitializeRowEventArgs e)
at the begining foreach (UltraGridCell cell in e.Row.Cells) I set an Appeareance on cells
and at the end of the method I call e.Row.DeallocateCells();
That clear all the appeareance settings I put on each cell. I call this method because I need to release some memory that solves one bug related to out of memory exception.
Is there a way to set the default appeareance of the cells to the changes I made before call DeallocateCells?
how can I DeallocateCells realesing memory and mantain the appearence changes I want?
thanks
There is no way to maintain an appearance on a cell that has been deallocated. That doesn't makes sense - the cell no longer exists, so it can't very well hold on to properties or sub-objects.
Are you applying an appearance to every cell? Or only some cells?
Are you trying to only deallocate the cells that do not have an appearance applied? I don't think there is a way to do that, but you can probably write your code in such as a way as to not allocate cells unnecessarily. You can also make your code a lot more memory efficient by re-using appearance objects, instead of creating a new one on each cell. These issues are discussed in more detail in the WinGrid Performance Guide.
Hi, thanks for your reply, we are reusing appearance objects, I think the problem is having several info on memory (too many) and trying to deallocate cells in a wrong way.
Sorry for my delay on answer, thanks again for your reply
So, are you still experiencing any issues? Did Mike's post help you? If no, could you please attach a small sample project and your requirements, so I can take a look?