title: How to get combobox-value from 'SelectedItem' in DataGrid
body: <p>I'm having trouble reading the selecteditem value of a combobox element which is part of a datagrid element. I suspect thre is a problem with the binding.
  With "$WPFDataGrid.SelectedItems.combobox" I get all values but not the selecteditem value of the combobox.</p>
  
  <pre><code>    &lt;DataGrid.Columns&gt;
              &lt;DataGridTemplateColumn Header="Combobox" Visibility="Visible" Width="300"&gt;
                  &lt;DataGridTemplateColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                             &lt;ComboBox
                             ItemsSource="{Binding Path=Combobox}"
                             SelectedItem="{Binding Path=Result, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"&gt;
                          &lt;/ComboBox&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/DataGridTemplateColumn.CellTemplate&gt;
              &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p> </p>
  
  <pre><code>class myRow{
  [Array]$Combobox
  [string]$Hostname
  }
  
  $test1 = New-Object myRow -Property @{Hostname = "test1"; Combobox = "TEST1","TEST2" }
  
  $WPFDataGrid.ItemsSource = @($test1)
  </code></pre>
  
  <p>Full Code:<a href="https://github.com/jkuehnis/PowerShell-DataGrid-with-Combobox/blob/master/DataGrid.ps1" rel="nofollow noreferrer">Full Code @GitHub</a></p>