How can i make sure the user can only enter either:
So far, this is what I am using, but it allows any 6 digit number:
<igDP:Field Name="BillingVendorID" Label="VendorID" Width="0.5*" > <igDP:Field.Settings> <igDP:FieldSettings> <igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamNumericEditor}"> <Setter Property="Mask" Value="######" /> </Style> </igDP:FieldSettings.EditorStyle> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field>
Hello Travis,
Thank you for your post.
I have been investigating your issue and one of approaches, which I can suggest you using Combobox for that column, where you can define the values, which would be allowed.
Other approach is based on you proposal for {char:n:s} mask, it allows you to define range of possible values for everyone character, ‘n’ in the mask specifies the number of character placeholder and ‘s’ specifies the set of acceptable characters.
I have created a sample application based on these approaches.
Please let me know if you need any further assistance on this matter.
I do not wish to have the pop up message when user enters an invalid value, i want to keep them from ever entering it in the first place, by using a mask.
I have been looking into your issue and I can suggest you use style for XamNumericEditor and set ValueConstraint property, where you can define the values, which would be allowed. I have created a sample for you, that shows you how you can use ValueConstraint in your scenario.
Please let me know if you need any further assistance on the matter.
i guess I'm looking for a Mask definition that MUST contain 6 numerical values (only a positive integer) and require it to be 1x0127. So the only allowed values would be 100127, 110127, 120127, 130127,140127, 150127,160127,170127,180127,190127.
Something like this, I just can't figure out how to define it correctly:
also, if I make
<Setter Property="Mask" Value="1#0127" />
,how can i get the value 1x0127 to bind to my property, not just the value the user entered for the # placeholder?