private void BtnDeleteMainRow_Click(object sender, RoutedEventArgs e) { _viewModel.SelectedMainRows.Clear(); foreach (var row in MainGrid.SelectedItems) { _viewModel.SelectedMainRows.Add((TblAssetViewModel)row); } _viewModel.DeleteMainRow(); }