From Xojo Documentation


Adds a section, with the optional title, to the table.


iOSTable.AddSection(title As Text = "") As Integer

Supported on Mobile(iOS).

Adds a section, with the optional title, to the table returning the index number for the new section.


Parameter Description
title The optional title to name the newly added section.


For a Plain table format, section headings appear in the table itself. Only non-blank section titles appear. If you add a section with a blank title, you cannot change the title later.

For a Group table format, the sections appear outside of the table.


Exception Description
UnsupportedOperationException When the table has a DataSource specified.

Sample Code

Add a section called "Tasks":


You may want to add a section and save the returned section number so you can use it to subsequently add rows:

Var newSection As Integer = Table1.AddSection("Tasks")
Table1.AddRow(newSection, "Task 1")
Table1.AddRow(newSection, "Task 2")