-
How would you go about setting focus to a new cell whenever a user has inserted a record? For example, every time the user press ENTER after inserting a record, a new row automaticlly display and is ready for another new recorder for input, I want the new row to have the focus (1st coloumn) so that the user doesn't need to use the mouse to set it. Any idea? I am totally new on dbgrid. I am using adodc with the dbgrid. Thanks!
-
Nevermind.... I figured it out. Thanks!
-
I have this problem in my app, please let me know how did you figured it out, Thanks in advance
-
In the dbgrid property, under keyboard tab, select WrapCellPointer and in the TabAction - dbgGridNavigation.
Hope this help.
-
Thank you for your reply
I tried what you suggested and still did not work, Look at my AddNew click event, It may have a problem..What do you think about???
Private Sub AddNew_Click()
Data1.Recordset.MoveLast
DBGrid1.AllowUpdate = True
DBGrid1.AllowAddNew = True
DBGrid1.SetFocus
End Sub
Thanks
-
I add the one line and it works fine..
Private Sub AddNew_Click()
Data1.Recordset.MoveLast
DBGrid1.AllowUpdate = True
DBGrid1.AllowAddNew = True
DBGrid1.SetFocus
DBGrid1.Row = DBGrid1.Row + 1
End Sub
You may have better way..
Thanks