DataGrid REALbasic Plugin

DataGrid.GetDefaultCell Method

This property is used to access the data from the StyleGrid Default Cell object.

GetDefaultCell() as DataGridCell



Returns a reference to the Grids default cell.


The property is read only, but data can be written to the returned class.
The default cell is the cell used to fill the gap, it is used for all virtual cells.

As DataGrid uses Einhugur's Floating Engine as data container, the Cell property is not guaranty to return a true cell.
That is if the desired cell is a virtual cell, then the Cell property will return the DefaultCell value of the DataGrid.

Virtual cells are cells which do not exist in memory and the gaps in-between are filled as DefaultCell.

In most cases, the Cell function should only be used to obtain a cell reference to read data from a cell.
And use the WritableCell function to obtain a reference to a cell to write into.
The WritableCell function creates a new cell in memory, if it does not exist already.

See Also

DataGrid Control