Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
How to add mask when using a Value Constraint in a XamDataGrid
posted

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>