Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
Problem with Maxlength in TextBox and MaxValue in UltraCurrencyTextEditor
posted

Hello all.

I have trouble with Maxlenght and MaxValue. It's work when you type but not work when you paste from Contextmenu or press Ctrl+V.

Example: When you set MaxValue = 1.000 you can not type (from keyboard) more than 1.000. But you can paste any value you want (ex: 3000). In this case, you will have a error message "Unable to update the data value. Input value dose not satisfy maximum value constraint".

Anybody help me solve this problem, or provide a solution.

Thank you

Reagard.

Parents
No Data
Reply
  • 290
    posted

    Acctually, This is error message in my system with DB. In your simple example, you won't see that. But problem still there.

    I created a simple example, with only one UltraCurrencyTextEditor and max value is 1000. But you can paste a value greater than 1000 into this. In this case, you can leave forcus out this control.

    Version, I'm using is 7.2.20072.61

    Step to reproduce:

    1. Create Winform with one UltraCurrencyEditor

    this.customUltraCurrecy1.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;
                this.customUltraCurrecy1.MaskInput = "{currency:-10.0}";
                this.customUltraCurrecy1.MaxValue = new decimal(new int[] {
                1000,
                0,
                0,
                0});
                this.customUltraCurrecy1.MinValue = new decimal(new int[] {
                1000,
                0,
                0,
                -2147483648});

    One TextBox with default property

    Run this form.

    2. Open NotePad, type 30000 and copy this value

    3. Paste this value into UltraCurrencyEditor

    Expect: Can not paste this value

    Actual: Value's pasted in to UltraCurrencyEditor and user can leave focus to TextBox.

Children