iOSMobileTable.AddRow

From Xojo Documentation

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

iOSMobileTable.AddRow(section As Integer, value As String)

Supported on Mobile.

Adds the value to the section.

Parameters

Parameter Description
section The section where the row will be added.
value The text to use for the row that is added.


Method

iOSMobileTable.AddRow(section As Integer, value As MobileTableCellData)

Supported on Mobile.

Adds the cell data to the section.

Parameters

Value Description
section The section where the row will be added.
data The MobileTableCellData to use for the row that is inserted.


Method

iOSMobileTable.AddRow(value As String)

Supported on Mobile.

Adds a new row with the value passed.


Notes

There has to be at least one section before you can add rows or you will get an OutOfBoundsException. If you do not want the section to appear, you can add it with a blank title.

If you are adding many rows, you should instead use iOSTableDataSource for better performance and reduced memory usage.

The following exceptions can be raised:

Exception Description
OutOfBoundsException When the section does not exist. At least one section must be added to the table before adding rows.
UnsupportedOperationException When the table has a DataSource specified.

Sample Code

Adds five rows to a table:

Table1.AddSection("") // No section will appear
For i As Integer = 0 To 4
Table1.AddRow(0, "Row " + i.ToString)
Next

Adds five rows to a table using a cell:

Table1.AddSection("") // No section will appear
Var cell As MobileTableCellData

For i As Integer = 0 To 4
cell = Table1.CreateCell("Row " + i.ToString)
Table1.AddRow(0, cell)
Next

See Also

AddRowAt method and MobileTableCellData class.