I can see based on this question: https://stackoverflow.com/a/3120866/181771 that it's possible to add a double-click event to a DataGrid row, e.g.:
<DataGrid ... >
<DataGrid.ItemContainerStyle>
<Style TargetType="DataGridRow">
<EventSetter Event="MouseDoubleClick" Handler="Row_DoubleClick"/>
</Style>
</DataGrid.ItemContainerStyle>
...
</DataGrid>
Is it possible for me to do this in C#, depending on certain conditions? If so, how?