<div class="meta" robots="noindex">

</div>

Interface

# iOSTableDataSourceEditing

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `iOSMobileTableDataSourceEditing</api/ios/iosmobiletabledatasourceediting>` as a replacement.

</div>

## Description

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 iOSTableDataSource.

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                                 | Parameters                                                                                                                                                                                                     | Returns                                                               | Shared |
|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|--------|
| `RowCount<iostabledatasourceediting.rowcount>`                       | table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`                                                                                                              | `Integer</api/data_types/integer>`                                    |        |
| `RowData<iostabledatasourceediting.rowdata>`                         | table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`, row As `Integer</api/data_types/integer>`                                                                   | `MobileTableCellData</api/user_interface/mobile/mobiletablecelldata>` |        |
| `RowEditingCompleted<iostabledatasourceediting.roweditingcompleted>` | table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`, row As `Integer</api/data_types/integer>`, action As `iOSTable.RowEditingStyles<iostable.roweditingstyles>` |                                                                       |        |
| `RowIsEditable<iostabledatasourceediting.rowiseditable>`             | table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`, row As `Integer</api/data_types/integer>`                                                                   | `Boolean</api/data_types/boolean>`                                    |        |
| `SectionCount<iostabledatasourceediting.sectioncount>`               | table As `iOSMobileTable</api/ios/iosmobiletable>`                                                                                                                                                             | `Integer</api/data_types/integer>`                                    |        |
| `SectionTitle<iostabledatasourceediting.sectiontitle>`               | table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`                                                                                                              | `String</api/data_types/string>`                                      |        |

## Method descriptions

<div id="iostabledatasourceediting.rowcount">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableDataSourceEditing.RowCount

**RowCount**(table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`) As `Integer</api/data_types/integer>`

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.

<div id="iostabledatasourceediting.rowdata">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableDataSourceEditing.RowData

**RowData**(table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`, row As `Integer</api/data_types/integer>`) As `MobileTableCellData</api/user_interface/mobile/mobiletablecelldata>`

The actual cell data for the section and row.

You will need to create an iOSTableCellData instance and populate it with the values from your data source to return it from this method.

<div id="iostabledatasourceediting.roweditingcompleted">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableDataSourceEditing.RowEditingCompleted

**RowEditingCompleted**(table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`, row As `Integer</api/data_types/integer>`, action As `iOSTable.RowEditingStyles<iostable.roweditingstyles>`)

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 `iOSTable.RowEditingStyle<iostable.roweditingstyle>` 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:

``` xojo
If action = iOSTable.RowEditingStyles.Delete Then
  Var sectionRows() As Integer = mSections.Value(section) 
  sectionRows.Remove(row)
  table.RemoveRow(section, row)
End If
```

<div id="iostabledatasourceediting.rowiseditable">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableDataSourceEditing.RowIsEditable

**RowIsEditable**(table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`, row As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

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 `iOSTable.RowEditingStyle<iostable.roweditingstyle>` 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:

``` xojo
Return True
```

<div id="iostabledatasourceediting.sectioncount">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableDataSourceEditing.SectionCount

**SectionCount**(table As `iOSMobileTable</api/ios/iosmobiletable>`) As `Integer</api/data_types/integer>`

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.

<div id="iostabledatasourceediting.sectiontitle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSTableDataSourceEditing.SectionTitle

**SectionTitle**(table As `iOSMobileTable</api/ios/iosmobiletable>`, section As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

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.

## Notes

Any data source that supports deletion and insertion of rows or that uses row actions must implement this interface.

When the iOSTable is made editable (by setting iOSTable.IsEditing = True): \* The data source's RowIsEditable 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.

## Compatibility

iOS projects on the iOS operating system.

## See also

`iOSMobileTable</api/ios/iosmobiletable>` control; `iOSMobileTableDataSource</api/ios/iosmobiletabledatasource>`, `iOSMobileTableDataSourceReordering</api/ios/iosmobiletabledatasourcereordering>` interfaces
