DataGrid REALbasic Plugin

DataGridRow.Recreate Method

Use this method to create a new internal row object without creating external REALbasic object.

Recreate()

Parameters

Remarks

This can give up to 13% speed increase in some cases.

Example how this can be used to gain some additional speed:

Without Recreate:
for i = 1 to 50000
  oRow = new DataGridRow(DataGrid1)
  oRow.WritableCell(1).Text ="Test " + Str(i)
  StyleGrid1.AppendRow(oRow)
next

With Recreate:
oRow = new DataGridRow(StyleGrid1)

for i = 1 to 50000
  oRow.WritableCell(1).Text ="Test " + Str(i)
  DataGrid1.AppendRow(oRow)

  oRow.Recreate
next

In the later example the REALbasic row object is created only once, and after that only a new internal object is constructed.

See Also

DataGridRow Class