I have Hyperlink.Command within a GridColumn.CellTemplate that I bind via an ElementName. I'd like to do the binding using RelativeSource but I couldn't figure out how to do so. Any help in this regard would br greatly appreciated. Thanks....
<dxg:GridControl
DataContext="{StaticResource viewModel}"
Name="grid"
ItemsSource="{Binding Details}"
Grid.Row="1">
<dxg:GridControl.View>
<dxg:TableView
ShowGroupPanel="False" />
</dxg:GridControl.View>
<dxg:GridControl.Columns>
<dxg:GridColumn
Header="Even or Odd"
Width="200"
FieldName="EvenOrOdd">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<TextBlock
Padding="4,0">
<Hyperlink
Command="{Binding DataContext.ToggleCommand, ElementName=grid}"
CommandParameter="{Binding RowData.Row}">
<TextBlock
Text="{Binding Value}" />
</Hyperlink>
</TextBlock>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn
FieldName="Number"
Width="200" />
</dxg:GridControl.Columns>
</dxg:GridControl>