I am looking to fire an event when a cell in a WPF DataGrid is clicked, I have tried
XAML
<DataGridComboBoxColumn.ElementStyle>
<Style TargetType="ComboBox">
<EventSetter Event="GotFocus" Handler="b1SetColor"/>
</Style>
</DataGridComboBoxColumn.ElementStyle>
C#
void b1SetColor(object sender, RoutedEventArgs e)
{
MessageBox.Show("Focused");
}
But nothing happens (doesn't fire) when I do click the Combobox cell. is there a way I can achieve this?