private void BtnSave_Onclick(object sender, RoutedEventArgs e) { if (TabStyle != null) { switch (TabStyle.SelectedIndex) { case 0: MainGrid.CommitEdit(); //_viewModel.SaveMainRow(); break; case 1: _viewModel.SaveMainRow(); break; } } }
private void BtnSave_Onclick(object sender, RoutedEventArgs e) { if (_viewModel.DataGridName == "DetailGrid") { DetailGrid.CommitEdit(); } else if (_viewModel.DataGridName == "SubDetailGrid") { SubDetailGrid.CommitEdit(); } else if (_viewModel.DataGridName == "SubEventGrid") { SubEventGrid.CommitEdit(); } else { MainGrid.CommitEdit(); } }
private void MainGrid_RowEditEnded(object sender, DataGridRowEditEndedEventArgs e) { MainGrid.CommitEdit(); }
private void BtnSave_Onclick(object sender, RoutedEventArgs e) { MainGrid.CommitEdit(); }