I have an issue where a user can paste values in to a cell when the editor is disabled. In this casethe cell is enabled based on other values. There is a multi-binding on the field to set the enabled flag.
<DataPresenter:Field Name="Price" Label="Price">
<DataPresenter:Field.Settings>
<DataGrid:NumericFieldSettings AllowEdit="True">
<DataGrid:NumericFieldSettings.EditorStyle>
<Style TargetType="Editors:XamNumericEditor">
<Setter Property="IsEnabled" Value="False"/>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="" Value=""/>
</MultiDataTrigger.Conditions>
<Setter Property="IsEnabled" Value="True"/>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</DataGrid:NumericFieldSettings.EditorStyle>
</DataGrid:NumericFieldSettings>
</DataPresenter:Field.Settings>
</DataPresenter:Field>
The code works and the cell will be editable when the conditions are met, but since the copy paste functionality is enabled the users can paste a value, even when the editor is disabled.
I took an example of the hosting controls in a grid and made small change to create an example. You can see that the salary column is disabled but you are still able to paste values in to the cell using ctrl v.
Is there something I am missing which would stop this from happening?
I was wondering if there has been any progress on this? Is it supposed to be possible to paste into cells whose editors have been disabled in this way? Is this the recommended way to have field level enabling/disabling?