DataGrid REALbasic Plugin

DataGridRow.WritableCell Method

This function is used to access data of a cell in read and write mode.

WritableCell(
   x as Integer) as DataGridCell

Parameters

x
The column number of the cell.

Returns

DataGridCell
Returns the cell with a guaranty that it is a true cell and not the Grid's default cell.

Remarks

The function is read only, but data can be written to the returned class.

Cell's number are one based, that is the first cell is cell(1).

As StyleGrid 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 StyleGrid.

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

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

See Also

DataGridRow Class