I got it ... here is what I used:
<DataGrid.Resources> <Style TargetType="{x:Type DataGridCell}"> <Setter Property="IsEnabled" Value="False" /> <Style.Triggers> <DataTrigger Value="PART_IsSelected" Binding="{Binding Path=Column.Header, RelativeSource={RelativeSource Self}}"> <Setter Property="IsEnabled" Value="True" /> </DataTrigger> </Style.Triggers> </Style> </DataGrid.Resources>
If you want, you can use Column.DisplayIndex instead of Column.Header
I'm still not sure why the binding will not work directly and should reference the RelativeSource, but at least it works :)
Rachel
source share