Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1205
Accessing the UltraGridCell CellAppearance and CellActivation properties
posted

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

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    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.

Children
No Data