TMSFNCDataGrid and TTMSFNCDataGridCellItemExtended

I noticed that when I set an object to table.Objects[c,r], or ManagedObjects[c,r] then the v_table.CellData[3,3].IsExtended is getting true and I can have other also useful properties at cell level like Datastring,databoolean, etc.

How can I transform a cell in TMSFNCDataGrid to this TTMSFNCDataGridCellItemExtended without needing to assign an object?

Thank you in advance

Hi,

TTMSFNCDataGridCellItemExtended is not used by default unless required because of memory consumption. If each cell would use this class they memory usage would increase quite fast. When adding buttons, checkbox, or applying additional cell specific properties on top of the basic cell value it’s automatically converted to an extended cell item. You can access (and automatically convert) the cell to an extended cell item by using

  TMSFNCDataGrid1.BeginUpdate;
  TMSFNCDataGrid1.Root.CellDataExtended[3, 3].DataString := 'Hello World';
  TMSFNCDataGrid1.EndUpdate;

However, it’s unclear which side-effects this will have, use it with caution

1 Like