Hi Andrew.
First, create a Private Field to house the row index:
Private _RowIndex As Integer = 0
Then, in the lstCast_ChildFormResults, set the row index before the listview gets requeried:
Private Sub lstCast_ChildFormResults(ByVal sender As System.Object, ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.ListViewChildFormResultsEventArgs) Handles lstCast.ChildFormResults
If e.Results = Windows.Forms.DialogResult.Cancel Then
MovieCast.RestoreCurrentDataTableSnapshot(False)
Else
_RowIndex = lstCast.FocusedItem.Index
e.Requery = True
End If
End Sub
Finally, add an AfterRequery event handler for the listview to reset the row index:
Private Sub lstCast_AfterRequery() Handles lstCast.AfterRequery
lstCast.Items(_RowIndex).Selected = True
lstCast.Items(_RowIndex).Focused = True
End Sub
Boa noite!