Hi!
I am trying to delete 1 row in a tableview by clicking on column 2 using the following:-
Sub tv1_SelectedCellChanged (RowIndex As Int, ColIndex As Int, Cell As Object)
If ColIndex = 1 Then
tv1 .Items .RemoveAt (tv1 .SelectedRow )
tv1.SelectedRow = -1 'If this line omitted all rows avove are deleted
End If
End Sub
as it is it deletes 2 rows if ' tv1.SelectedRow = -1 ' is not in it deletes all rows above the selected one.
Any help or thought on this .
Thanks Dave.
I am trying to delete 1 row in a tableview by clicking on column 2 using the following:-
Sub tv1_SelectedCellChanged (RowIndex As Int, ColIndex As Int, Cell As Object)
If ColIndex = 1 Then
tv1 .Items .RemoveAt (tv1 .SelectedRow )
tv1.SelectedRow = -1 'If this line omitted all rows avove are deleted
End If
End Sub
as it is it deletes 2 rows if ' tv1.SelectedRow = -1 ' is not in it deletes all rows above the selected one.
Any help or thought on this .
Thanks Dave.