Hi.
I want to set only max length of the XamMaskedEditor the control only 30 chars using mask property only.
<
igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamMaskedEditor}">
<Setter Property="Mask" Value=""/>
</Style>
</igDP:FieldSettings.EditorStyle>
Can any guide me what value of mask property need to set?
Hello,
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello, Ekaterina.Thanks for reply.I used this but it's not solving my requirment. I need to set only length of characters and there is no any restrictions on entering characters. Above mask creates restriction on entering characters. Please guide me on this.FromAmeeth Paatil
Hello
Thank you for your answer.
In order to specify the number of the characters. no matter of their type, you can just write “C” as many times as characters you would like to have. For example Mask="CCC" would set a restriction of 3 characters.
Please do not hesitate to ask in case of future requests.
Infragistics, Inc.
I am just checking if you require any further assistance on the matter.
Hi,
My requirement is to restrict user to 200 chars. Please advice.
Regards,
Nirmit
Hello Nirmit,
You can use the ValueConstraint Property of the XamMaskedEditor. You can set it like this:
<igEditors:XamMaskedEditor Name="xamMaskedEditor1" VerticalAlignment="Top" > <igEditors:XamMaskedEditor.ValueConstraint> <igEditors:ValueConstraint MaxLength="200"/> </igEditors:XamMaskedEditor.ValueConstraint> </igEditors:XamMaskedEditor>
Hope this helps you.
this post looks like the closest one to the problem I am having setting the minimum length:
in my UnboundField, I am setting a <Style> of type XamMaskedEditor of infragistics, like this:
<igDP:UnboundField.Settings> <igDP:FieldSettings EditorType="{x:Type igEditors:XamMaskedEditor}" > <igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamMaskedEditor}" > <Setter Property="Mask" Value="{}{char:50:0-9a-zA-Z _}"/> ... </Style> </igDP:FieldSettings.EditorStyle> </igDP:FieldSettings> </igDP:UnboundField.Settings>
as you can see, the maximum length of the field is 50 characters, but I cannot set the minimum length that is 2.
I would like to use the ValueConstraint property, but don't know how.
could you please, advise?
thanks,
I had a similar issue where I needed to limit a field to only numeric and no more than 32 characters in length, When I tried this:
<Setter Property="Mask" Value="{}{char:32:0-9}" /> I received this error if I entered 10 characters or more when .
When I changed it to this:
<Setter Property="Mask" Value="{}>{char:32:0-9}" />It worked correctly. Do you know why the first one gives me an error but the second one works?
Thanks,Jeff
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
yes, it did.
thanks.
Thank you for your post. I have been looking into it and I can suggest you add the following Setter to your Style:
<Setter Property="ValueConstraint"> <Setter.Value> <igEditors:ValueConstraint MinLength="2"/> </Setter.Value> </Setter>