I have added Value Constraints to all my XamDataGrid fields to test for business rules. I have decimal values that need to be treated to accept a prescision of 3 not 2, (i.e. 20.234), below is my XAML which is working great except that I can only enter up to two decimal places instead of 3. Please advise:
<igDP:Field Name="AsFoundMeter" Label="As Found Meter"> <igDP:Field.Settings> <igDP:FieldSettings LabelMinWidth="100" EditorType="{x:Type igEditors:XamNumericEditor}" EditAsType="{x:Type sys:Double}"> <igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:ValueEditor}"> <Style.Setters> <Setter Property="ValueConstraint"> <Setter.Value> <igEditors:ValueConstraint Nullable="False" MinInclusive="0" MaxInclusive="1050" /> </Setter.Value> </Setter> <Setter Property="InvalidValueBehavior" Value="RetainValue" /> </Style.Setters> <Style.Triggers> <Trigger Property="IsValueValid" Value="false"> <Trigger.Setters> <Setter Property="BorderBrush" Value="Red" /> </Trigger.Setters> </Trigger> </Style.Triggers> </Style> </igDP:FieldSettings.EditorStyle> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field>
Hello,
You can craete a setter for this style and set the Mask property:
<Setter Property="Mask" Value="{}{double:-4.3:c}"/>