Hello Community,
I have a question concerning the following topic:
I have a list, which holds ids. I am using the table module V1.43.
The table module offers the method 'removerow'. I would like to
remove the row which has the id of the list in the first column.
The problem is that the the size of the table (the number of rows)
reduces during the loop. So I get an exception. Any idea how to solve the
problem?
Kind regards
h725
I have a question concerning the following topic:
I have a list, which holds ids. I am using the table module V1.43.
The table module offers the method 'removerow'. I would like to
remove the row which has the id of the list in the first column.
B4X:
dim row as integer = 0
dim removelist as list
removelist.initialize
removelist.add(1)
removelist.add(2)
For j = row To table.Size -1
Dim o() As String
o = table.GetValues(j)
For i = 0 To removelist.Size -1
Dim p() As String
p = removelist.Get(i)
If o(0) = p(0) Then
table.RemoveRow(j)
End If
Next
Next
The problem is that the the size of the table (the number of rows)
reduces during the loop. So I get an exception. Any idea how to solve the
problem?
Kind regards
h725