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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Datagridview double enter event handler

Datagridview double enter event handler

Scheduled Pinned Locked Moved C#
5 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.
  • S Offline
    S Offline
    spikekirk
    wrote on last edited by
    #1

    Hi I have a datagridview of transactions.Does anyone know if there is a way that I can catch an event handler for the double enter keypress. Thanks Kirk

    H 1 Reply Last reply
    0
    • S spikekirk

      Hi I have a datagridview of transactions.Does anyone know if there is a way that I can catch an event handler for the double enter keypress. Thanks Kirk

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      I do not believe that there is such a thing. What you might do is handle the keydown/keypress event, test for enter and if so check a flag, if flag is set it's a double enter. If flag not set, set it and start a timer. When timer fires reset flag and stop timer. That way you can select the double enter period for yourself. [Edit] Also, if key is not enter, reset the flag. [/Edit]

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      modified on Thursday, June 11, 2009 8:16 AM

      S 1 Reply Last reply
      0
      • H Henry Minute

        I do not believe that there is such a thing. What you might do is handle the keydown/keypress event, test for enter and if so check a flag, if flag is set it's a double enter. If flag not set, set it and start a timer. When timer fires reset flag and stop timer. That way you can select the double enter period for yourself. [Edit] Also, if key is not enter, reset the flag. [/Edit]

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        modified on Thursday, June 11, 2009 8:16 AM

        S Offline
        S Offline
        saurabh sahay
        wrote on last edited by
        #3

        right solution...

        H 1 Reply Last reply
        0
        • S saurabh sahay

          right solution...

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          Why, thank you sir! :)

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          S 1 Reply Last reply
          0
          • H Henry Minute

            Why, thank you sir! :)

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

            S Offline
            S Offline
            saurabh sahay
            wrote on last edited by
            #5

            this is called the smart way of doing :)

            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