Hi,
I have created an UnboundField with a ControlTamplate and a button in it.
This Button is used to delete a Row. I would like to hide this button in the AddNew-Row because it doesn't make sence to delete a not existing Row.
Do you have an Idea how to solve this Problem?
Here is the Code of the Column:
<igDP:UnboundField Name="">
<igDP:UnboundField.Settings>
<igDP:FieldSettings CellClickAction="Default" AllowEdit="False" AllowGroupBy="False">
</Setter>
Yourse sincerealy
Thomas
Hello Thomas,
You can do this by creating a Trigger/DataTrigger and check for the IsAddRecord property of the DataRecordPresenter and if it is true, hide the button. You can use something like this:
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsAddRecord}" Value="True">
<Setter Property="Visibility" TargetName="delImage" Value="Collapsed"/>
</DataTrigger>
</ControlTemplate.Triggers>
where your target name would be the name of the button.
Hope this helps.