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. Visual Basic
  4. enter key problem in datagridview control

enter key problem in datagridview control

Scheduled Pinned Locked Moved Visual Basic
helpquestion
2 Posts 2 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
    sowmi_ssk
    wrote on last edited by
    #1

    I am developing some application using the datagridview control. Inwhich if I press the enter key in any cell the focus move to next row.but I want the focus should move to next cell just like pressing the tab key. How can i solve the problem. Please help

    T 1 Reply Last reply
    0
    • S sowmi_ssk

      I am developing some application using the datagridview control. Inwhich if I press the enter key in any cell the focus move to next row.but I want the focus should move to next cell just like pressing the tab key. How can i solve the problem. Please help

      T Offline
      T Offline
      Taylor
      wrote on last edited by
      #2

      make the class below.run the program and add the control to your project.

      Public Class MyDataGridView
      Inherits DataGridView
      Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
      If e.KeyCode = Keys.Enter Then

              Dim j As New System.Windows.Forms.KeyEventArgs(Keys.Tab)
              MyBase.OnKeyDown(j)
          Else
              MyBase.OnKeyDown(e)
          End If
      
      End Sub
      

      End Class

      A.E.K

      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