locked
TextChaged event executed before button click event RRS feed

  • Question

  • Hi, i have a textbox control with TextChaged event the problem is this event executed even when the user click the save button and text property of the textbox don't keep of input text ... i hope to find a way to keep the input text.

    thanks for help ...

    Friday, February 21, 2014 11:22 PM

Answers

  • Solved by using the TextBoxLeave event to catch the input until the user press the button to save data
    • Marked as answer by Rashiya Wednesday, March 12, 2014 10:00 PM
    Wednesday, March 12, 2014 9:48 PM

All replies

  • As name suggest TextChangeEvent always fires as soon as text changes in textbox 

    Can you post your code so as to get clear idea about you problem which also helps in to resolve your issue


    Shridhar J Joshi Thanks a lot

    Saturday, February 22, 2014 4:28 AM
  • Hi

    This event is raised if the Text property is changed by either a programmatic modification or user interaction.  So please check the code of the save button to make sure that you are not modifying it by program. Or just put the break point on textbox's textChanged event and check call stock of Visual Studio or just debug it by using F11 to find out from where TextChanged event is called.

      


    Ashish Pandey


    Saturday, February 22, 2014 9:18 AM
  • Probably has the textbox the focus at the moment when the button is hit.


    Success
    Cor

    Saturday, February 22, 2014 9:20 AM
  • Solved by using the TextBoxLeave event to catch the input until the user press the button to save data
    • Marked as answer by Rashiya Wednesday, March 12, 2014 10:00 PM
    Wednesday, March 12, 2014 9:48 PM