I am trying to add a button to an unbound field in XamDataPresenter.
Here is the button template:
<Style x:Key="CancelButtonTemplate" TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<Button x:Name="CancelButton" Content="Cancel" Command="{Binding CancelButtonCommand}" Width="80" Height="20" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
And here is the unbound field in XamDataPresenter:
<igDP:UnboundField Name="CancelOrder" Label="Cancel Order" Column="11">
<igDP:UnboundField.Settings>
<igDP:FieldSettings CellValuePresenterStyle="{StaticResource CancelButtonTemplate}" CellHeight="12" CellWidth="50">
</igDP:FieldSettings>
</igDP:UnboundField.Settings>
</igDP:UnboundField>
</igDP:FieldLayout.Fields>
The "CancelButtonCommand" that the button is bound to is a public property in the viewmodel and i have verified that it works with a button outside the XamDataPresenter and without a template.
The button shows up in the grid but nothing happens when i press it.
What am i doing wrong?