A data source to use to enable editing of iOSTable data. When a table is put into "edit mode", the user can use the insertion and deletion editing controls to add or remove rows from the table and its data source. Aggregates iOSMobileTableDataSource.
table As iOSMobileTable
Asks the data source if the specified row can be edited. Most data sources that implement this interface will unconditionally return True.
The specific type of edit that is allowed (None, Insert or Delete) is specified in the iOSMobileTable.RowEditingStyles event.
To allow row actions to work you must Return True from this method.
In most cases, you will return True for this method to allow the row to be edited:
Return the number of rows for the section.
Your class should return the number of rows in your data source for this section. For example, if you are showing a list of names in sections for the first letter of the last name, then this method would return the number of names in the specified section.
The actual cell data for the section and row.
You will need to create an MobileTableCellData instance and populate it with the values from your data source to return it from this method.
Tells the data source that the user wants a row inserted or removed. The data source should update its internal state and inform the table of its changes. Data sources must not alter the table's editing state from within this method.
The specific type of edit that is allowed (None, Insert or Delete) is specified in the iOSMobileTable.ApplyRowEditingStyle event.
If the user deleted a row, then remove it from the mSections Dictionary property used by the data source and remove it from the table:
If action = iOSMobileTable.RowEditingStyles.Delete Then Var sectionRows() As Integer = mSections.Value(section) sectionRows.Remove(row) table.RemoveRow(section, row) End If
Return the number of sections.
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.
Return the title for the section.
If you are not using sections, you can return empty text ("") here.
When using sections, return the name for the specified section. For example, if you are displaying names with sections for each letter of the alphabet, you might return "A" when section of 0 is passed in as a parameter.
Any data source that supports deletion and insertion of rows or that uses row actions must implement this interface.
When the iOSMobileTable is made editable (by setting iOSMobileTable.IsEditing = True):
The data source's AllowRowEditing method is called for the visible rows and the editable rows get reordering controls.
The user taps on a row's delete or insert button.
The data source's RowEditingCompleted method is called so the data source can update its internal state.
iOS projects on the iOS operating system.