private void MainGrid_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { foreach (var variable in e.RemovedItems) { _viewModel.SaveOldRow(variable as TblAssetViewModel); } }