C1NumericEdit TextChanged fires twice

Posted by: ericeswanson on 27 September 2017, 9:08 pm EST

    • Post Options:
    • Link

    Posted 27 September 2017, 9:08 pm EST

    Hello,

    If a C1NumericEdit has text (“3”), if a user highlights the text and changes it (“4”), the C1NumericEdit will fire two TextChanged events. The first will be a textchange to an empty string (“”), and then the second event will be for the actual change (“4”). Would it be possible to have C1NumericEdit fire only one event if the user replaces the text in the control? (ie: “3” → “4”)

    Thank you

  • Posted 27 September 2017, 9:08 pm EST

    Hello,

    I could replicate this issue at my end too. I am looking further into this issue.

    However, as a workaround you can still meet your requirement by catching the C1NumericEdit’s Text in C1NumericEdit’s “TextChanged” event as follows:

    [csharp] private void c1NumericEdit1_TextChanged(object sender, EventArgs e)

    {

    if(c1NumericEdit1.Text!=“”)

    {

    System.Diagnostics.Debug.WriteLine(“TextChanged event fired”);

    }

    }[/csharp]

    Following the above mentioned approach, C1NumericEdit fires its TextChanged event only once for “3”->“4”

    Let me know if this does not works for you.

    Attached is sample application for reference.

    Regards

    Ruchir Agarwal

    2017/01/prj_C1NumericEditTextChangedEvent.zip

  • Posted 27 September 2017, 9:08 pm EST

    Hello,

    The issue is a bug and I have escalated the same to the concerned team(Tracking ID:235165 (internal use Only)). I will update you once I have some information from them. Till then, you may meet your requirement using the above mentioned workaround.

    Let me know if it does not works for you.

    Thanks & Regards

    Ruchir Agarwal

  • Posted 27 September 2017, 9:08 pm EST

    Hi,

    We are pleased to inform you that the issue has been fixed in the latest release of C1_WinForms. You may download the same from the following links:

    http://prerelease.componentone.com/dotnet40/c1winforms/2017-t1/C1WinForms.4_4.0.20171.248.zip

    http://prerelease.componentone.com/dotnet20/c1winforms/2017-t1/C1WinForms.2_2.0.20171.248.zip

    Best Regards

    Ruchir Agarwal

  • Posted 29 November 2017, 8:56 am EST

    Hello and sorry

    but the bug is not fixed in the C1TextBox.

    I’m using C1.Win.C1Input.4, version 4.0.20173.282.

    exactly the same mistake.

    The text is “190”

    mark the “1” and replace with “5”

    at the first TextChanged event the text “90”

    at the second TextChanged event the text “590”

    and now???

    Best Regards

    Herrmann

Need extra support?

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

Learn More

Forum Channels