Hi,
Is it possible to access the CellAppearance and CellActivation properties of a cell without having to create an instance of the UltraGridCell object itself, i.e. something similar to the getCellText and getCellValue methods on the UltraGridRow?
I am updating a grid with a few thousand rows and about one hundred columns and at the moment I am having to access each cell individually to update the Appearance and Activation properties. This involves creating an UltraGridCell object each time and I have noticed that this is consuming a lot of memory.
Thanks in advance,
Denis
Hi Denis,
Are you setting different property settings on individual cells within the same column?
You can set CellActivation and CellAppearance on the column or the band.Override, or the grid.DisplayLayout.Override to provide appearances to large groups of cells without creating cell objects.It's much more efficient to set the CellAppearance on the column than the apply the same appearance to every cell within a column.
If you need to apply a different property setting, like Activation, to each cell in a column, then the column has to be created - there's no way around that. SetCellValue works because the value of the cell is not actually stored on the column, anyway, it's stored on the row. In fact, it's stored not on the row, but on the underlying data row.
The same applies to the Appearance, but for appearances, you do have another option. You could use a DrawFilter to intercept the actual drawing of the cell and bypass using the Appearance object altogether. This would be far more efficient, since you only have to deal with cells that are actually visible on the screen and whose cell objects are already created and you probably don't have to create Appearance objects for the individual cells at all.