DataGridComboBoxColumn SelectionChanged

Mar 6, 2009 at 12:37 AM
How can the SelctionChanged event get wired to the ComboBox in the DataGridComboBoxColum.  I tried the following, however, the cbo_selectionchanged event only fires once.


ComboBox cbo;



private void RecipeActuatorPositionsGrid_BeginningEdit(object sender, Microsoft.Windows.Controls.DataGridBeginningEditEventArgs e)
    cbo = (System.Windows.Controls.
    cbo.SelectionChanged +=
new SelectionChangedEventHandler(cbo_SelectionChanged);



int i = 0;



void cbo_SelectionChanged(object sender, SelectionChangedEventArgs e)



Mar 6, 2009 at 6:57 PM

<dg:DataGridComboBoxColumn ...>
        <Style TargetType={x:Type ComboBox}>
            <EventSetter Event="SelectionChanged" Handler="cbo_SelectionChanged" />
Mar 6, 2009 at 8:00 PM
Thanks for the help, worked like a charm.  I did have to add quotes around the {x:Type ComboBox}.