Hi all,
Require to make the XamNumericEditor as a numeric textbox which can take values from 0 to 999.
I’ve tried the following code as mentioned below Code1 and Code2, Getting error message "Value is invalid, Please enter a Valid value" when numbers are provided which are less than three digits number and tabbed out.
Looks like it is validating the blank value and providing invalid value message. Is there any solution/workaround for this?
Thanks
Ritesh
Code1:
<igEditors:XamNumericEditor Grid.Column="1" Margin="21,6,8.5,1" Name="txtMinFlightDelay" xmlns:igEditors="http://infragistics.com/Editors" ToolTip="Enter Minimum Flight Delay" TabIndex="0" Mask="###"/>
Code2:
<igEditors:XamNumericEditor Grid.Column="1" Margin="21,6,8.5,1" Name="txtMinFlightDelay" xmlns:igEditors="http://infragistics.com/Editors" ToolTip="Enter Minimum Flight Delay" TabIndex="0" Mask="###">
<igEditors:XamNumericEditor.ValueConstraint>
<igEditors:ValueConstraint ValidateAsType="PositiveInteger64" MinInclusive="0" MaxInclusive="999"/>
</igEditors:XamNumericEditor.ValueConstraint>
</igEditors:XamNumericEditor>
Error message in Messagebox: "Value is invalid, Please enter a Valid value".
Hello Ritesh,
This is because, the "#" is a digit placeholder and the digit is required. This is why you are getting this error. What you should be using is "n", which is a digit placeholder and the digit is not required. That will allow you to enter less than a three digit number.
Hope this helps.
Hi Alex
Is there a way to mod the error message when the user enters invalid data? "Value is invalid. Please enter valid value. " does not provide the user with a reason on why it is invalid. Something like "Only values between 1 and 999 is valid" would help the user a lot more.
<igEditors:XamNumericEditor Mask="nnn"> <igEditors:XamNumericEditor.ValueConstraint> <igEditors:ValueConstraint ValidateAsType="PositiveInteger64" MinInclusive="1" MaxInclusive="999"/> </igEditors:XamNumericEditor.ValueConstraint> </igEditors:XamNumericEditor>
This is the code I used, but the user can still enter 0.
Is there a way toe remove the ____ in the box and only leave open spaces?
Regards
Christo
Hello Christo,
You can change this text with Customization strings. You can find more information on the customization strings and how to set them here.
the mentioned link does not exist. please provide the link or solution
Thanks in advance