DataGrid REALbasic Plugin |

# DataGrid.Cell Method

This property is used to access the data of a cell.

Cell(
x as integer,
y as integer) as DataGridCell

#### Parameters

x
  The column number of the cell.
y
  The row number of the cell.

#### Returns

DataGridCell
  Returns a reference to the requested cell or to the Grid's default cell if the requested cell did not actually exist in memory.

#### Remarks

Because of the nature of DataGrid to be a event drive data requester then usage of this property mostly makes sense for reading.
Cell's number are one based, that is the first cell is Cell(1,1).
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 property should only be used to read data from a cell.
And 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

DataGrid Control