Identifying and Removing Currently Selected Row In Table

Hi

I’m trying to figure out how to remove a selected row from an iOS Table. The language reference lists this code:

Table1.RemoveRow(0, 4) // Removes row 4 from section 0

That is okay if you know the integer of the row you want to remove, but what if you want to remove the row you are tapping on. How can you get the index or Row Integer for that row? Or how do you identify the Row number that you selected?

In regular Xojo the code is:

ListBox1.RemoveRow(ListBox1.ListIndex)

Is there an equivalent for the iOS side?

The iOSTable.Action event handler is called when a row is tapped. You can use that even handler to track the last selected section/row and then use that information to remove the row later.

Hi Paul,

Thanks for taking the time to help me. I get it now.

[code]Dim selectedCell As iOSTableCellData = Table2.RowData(section, row)
txt2.Text=row. ToText //This will give me the row integer.

Table2.RemoveRow(0, row) //This code deletes the row.[/code]

Thanks again. I really appreciate it.