C1TextBox: Value can be assigned string in Validated event > MaxLength

Posted by: pauld on 12 May 2022, 6:03 am EST

  • Posted 12 May 2022, 6:03 am EST

    Out UI controls are version 4.0.20191.359 (as shown in winforms solution references).

    The textbox in question has MaxLength set to 11.
    We have a handler for the Validated event.
    In the Validated event, we insert some extra formatting characters into the string before assigning the string into the textbox Value property.
    The Value allows a string length greater than the MaxLength of the control.

    Shouldn't the textbox disallow that?

    -- Paul
  • Replied 12 May 2022, 8:02 pm EST

    Hi Paul,

    This is the designed behavior of the C1TextBox. The MaxLength property gets or sets the maximum number of characters the user can type or paste into the control. It does not restrict the number of characters assigned to the Text/Value property through code.

    Although, we observed that the description of the MaxLength property is a bit confusing. We have escalated it to the development team for enhancement. We will let you know as soon as we have an update.


    Kind Regards,
  • Replied 13 May 2022, 2:32 am EST


    Thanks for the quick response and the information.

    -- Paul
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels