private void Button_Click(object sender, RoutedEventArgs e) { Popup1.PlacementTarget = TesTextBox; Popup1.Placement = PlacementMode.Bottom; Popup1.IsOpen = true; } private void TestDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { TesTextBox.Text = (dataGrid.SelectedItem as DataRowView).Row["c_AirStrategyExpCode"].ToString(); }
dataGrid.ItemsSource = ds.Tables[0].DefaultView; dataGrid.LoadingRow += DataGridOnLoadingRow;