iOSMobileTable.AddRowAt

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

iOSMobileTable.AddRowAt(section As Integer, index As Integer)

Supported on Mobile.

Adds a single row into the table at the index passed without forcing a full table refresh from the DataSource.

Parameters

Value Description
section The section is added before this index section.
index The row is added before this index row.

Exceptions

Exception Description
OutOfBoundsException When the section or index does not exist.
UnsupportedOperationException When the table does not have a DataSource specified.

Notes

When you insert the row using this version of the method, its value is fetched from the DataSource. This method only works when the table has a DataSource specified.


Method

iOSMobileTable.AddRowAt(section As Integer, index As Integer, value As MobileTableCellData)

Supported on Mobile.

Adds a new row with the cell data for the section at the row index.

Parameters

Value Description
section The section is added before this index section.
index The row is added before this index row.
cell The MobileTableCellData to use for the row that is inserted.

Exceptions

Exception Description
OutOfBoundsException When the section or index does not exist.


Method

iOSMobileTable.AddRowAt(section As Integer, index As Integer, value As String)

Supported on Mobile.

Adds a new row with the value for the section at the row index.

Parameters

Value Description
section The section is added before this index section.
index The row is added before this index row.
value The String to use for the row that is added.

Exceptions

Exception Description
OutOfBoundsException When the section or index does not exist.

Sample Code

Adds a row at the beginning of the table, retrieving its value from the specified DataSource:

Table1.AddRowAt(0, 0)

Inserts a row in the first section:

Var cell As New MobileTableCellData
cell.Text = "Hello"
Table1.AddRowAt(0, 0, cell)

Add a row in the first position of the Table:

Table1.AddRowAt(0, 0, "First Row")

See Also

AddRow method and MobileTableCellData class.