Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ,sir and friends ,

i in some trouble to select data from datagridview in visual basic 2013/2014 windows basic form programing
normally i used datgridview cell click event and that got the success each time but it's only possible on mouse click ,i want to select cell data on enter key press in appropriate cell
need help to solve this

What I have tried:

i use only cell click
Private Sub dgvprod_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvprod.CellContentClick
Posted
Updated 2-Jan-20 21:22pm

1 solution

Don't do it.
The reason it's not simple to do is that it breaks all the rules for UI design in Windows: ENTER is a "special key" which means "I'm finished", not "I want to enter data".
Normally, ENTER will terminate an entry, or close a form, or end a paragraph - none of those are consistent with what you are trying to do - and that means that your app has markedly different behaviour to all other Windows apps. Which means that it will confuse users, and will be disliked, even uninstalled.

I'd strongly suggest you rethink your UI design: this would not be simple to implement, and would not produce a good user experience.
 
Share this answer
 
Comments
Richard MacCutchan 3-Jan-20 4:16am    
I know you don't drink alcohol so you cannot claim you were drunk ... check the date.
OriginalGriff 3-Jan-20 4:23am    
I do have a cold, but no, I didn't notice the date at all :blush:

Paracetamol, Griff - go get the paracetamol ... :sigh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900