Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Temporary disable text edit change event? [solved]

Temporary disable text edit change event? [solved]

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vaclav_
    wrote on last edited by
    #1

    I am using text edit box change event to retrieve data from database. When user types in partial text and the SQL returns only one record I would like to insert that data back to the edit text box with some modifications. Inserting the data back generates a change event and puts the program in tailspin. Is it possible to selectively disable the change event? Thanks for your help. Vaclav -- Modified Monday, June 13, 2011 4:49 PM

    A N 2 Replies Last reply
    0
    • V Vaclav_

      I am using text edit box change event to retrieve data from database. When user types in partial text and the SQL returns only one record I would like to insert that data back to the edit text box with some modifications. Inserting the data back generates a change event and puts the program in tailspin. Is it possible to selectively disable the change event? Thanks for your help. Vaclav -- Modified Monday, June 13, 2011 4:49 PM

      A Offline
      A Offline
      Abhi Lahare
      wrote on last edited by
      #2
      1. Yes, if you sent a specfic format ( like only numbers) to the sql 2) The best way is to use different control to be safer side, since this will avoid problems down the road. HTH
      1 Reply Last reply
      0
      • V Vaclav_

        I am using text edit box change event to retrieve data from database. When user types in partial text and the SQL returns only one record I would like to insert that data back to the edit text box with some modifications. Inserting the data back generates a change event and puts the program in tailspin. Is it possible to selectively disable the change event? Thanks for your help. Vaclav -- Modified Monday, June 13, 2011 4:49 PM

        N Offline
        N Offline
        Niklas L
        wrote on last edited by
        #3

        I would go for setting a flag in the auto complete function, if that's what you're doing, and checking/clearing it in the event handler.

        V 1 Reply Last reply
        0
        • N Niklas L

          I would go for setting a flag in the auto complete function, if that's what you're doing, and checking/clearing it in the event handler.

          V Offline
          V Offline
          Vaclav_
          wrote on last edited by
          #4

          Thank you Niklas, what a simple solution. Perfect KISS! Vaclav

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups