Is it possible to set the max number of characters in a XamComboEditor? Or maybe in a simple ComboBox?
Thanks.
Nico
Hi Nico,
Both the XamComboEditor and ComboBox don't have any maxlength property. What you can do though is specify MaxLength on the XamComboEditor's ValueConstraint object. This will show an error message to the user once he tries to leave the editor if the value inside the editor doesn't meet any criteria specified on the ValueConstraint, including MaxLength.
Hope this helps,
Sandip
Hy Sandip. Thanks very much for help.
I have tried this, but it doesn't work. I don't know why. I can enter numbers and more them 3 characters and I don't get any error messages. Is there another way or have I done somethig wrong?
Here is my example:
<igEditors:XamComboEditor Name="cmbCountryCode" Grid.Row="0" Grid.Column="1" Margin="1,1,1,1" IsEditable="True" InvalidValueBehavior="DisplayErrorMessage">
<igEditors:XamComboEditor.ValueConstraint>
<igEditors:ValueConstraint ValidateAsType="Text" MaxLength="3" />
</igEditors:XamComboEditor.ValueConstraint>
</igEditors:XamComboEditor>
Thanks again for help.
This seems like a bug. We've entered it into our bug tracking system and it will be fixed in a future hotfix. if you want to get notified when the hotfix with the fix to this issue gets released, you can report it to infragistics tech support at http://es.infragistics.com/gethelp.
Has this been fixed. I have version 9.1 and it doesn't seem to be.