I am novice in WPF. I am using Xam Datagrid which consists of several fields. I want to set MaxLength field for a below field. How do I set it? User should not be able to enter more than 25 characters. Thanks in advance.
<
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="true" CellMaxWidth="18" LabelTextAlignment = "Left" CellContentAlignment ="LabelLeftOfValueStretch"/>
</igDP:Field>
Thanks Alex. This works.
Hello,
It sounds like you want to set some kind of constraint (length of the text) rather than length of the Field. If that is the case, you should create a style for the value editor - for example XamTextEditor and apply that style at the EditorStyle property of the Field. In this style, you should create a setter for the ValueConstraint property and set some constraints.
It should look like this:
<Style TargetType="igEditors:XamTextEditor" x:Key="Style"> <Setter Property="ValueConstraint"> <Setter.Value> <igEditors:ValueConstraint MaxLength="25"/> </Setter.Value> </Setter> </Style>