iOSMobileTableDataSource.SectionCount

From Xojo Documentation

Revision as of 02:47, 4 November 2020 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

iOSMobileTableDataSource.SectionCount(table As iOSMobileTable) As Integer

Supported on Mobile.

Return the number of sections.

Parameters

Parameter Description
table The iOSMobileTable instance using this data source.

Notes

You should return the total number of sections in your data source. For example, if you are displaying names with sections for each letter of the alphabet, then you might return 26 here.

If you are not using sections, you can return 1 since there always needs to be at least one section.

Sample Code

Refer to the data source example in the User Guide to see how to set up a Data Source that returns names, with sections for the first letter of each last name.

You can also refer to the sample project included with Xojo:

  • Examples/iOS/Controls/Table/TableDataSource