Hi Peter!
The problem is that Erel is storing the index on the tag of the textfields, everytime you reorder the index is changed, add this code to solve the issue:
private Sub tableview1_MouseClicked (EventData As MouseEvent)
For i = 0 To TableView1.Items.Size -1
Dim r(2) As Object = TableView1.Items.Get(i)
For j = 0 To r.Length -1
Dim txt As TextField = r(j)
txt.Tag = i
Next
Next
End Sub
you may call it brutal force, but it works.
Another option, less error prone is:
private Sub TableTextField_FocusChanged (HasFocus As Boolean)
If HasFocus Then
Dim tf As TextField = Sender
TableView1.SelectedRow = ASJO(tf.parent).RunMethodJO("getTableRow",Null).RunMethod("getIndex",Null)
End If
end sub
Private Sub ASJO(JO As JavaObject) As JavaObject
Return JO
End Sub
you can use any of the 2 solutions.