I have a program that displays a tableview. When I click on a row, a SelectedRowChanged event is triggered. This sub calls another form with some detail info about the item clicked. The tableview is closed. So far so good.
When I leave the detail form I want to return to the form with the original tableview. As soon as it is started, it triggers the SelectedRowChanged event again, but with row index - 1 which blows up the code or loops forever if catched on this condition. How can I reset this event so that it triggers only when a row is clicked again? I have tried TableView.clearselection, to no avail. Many thanks for advice.