Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

Select a datagridview row select using enter key

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
julio - 05 Feb 2007 19:38 GMT
Hi, Im using VS 2005 and winforms
I need to select a row in the datagridview, but clicking the enter key,
because our customer says that for him is more simple to use the enter key
instead the mouse
The problem is to find the event that I need, is an event to fire this?
Regards
Julio
ClayB - 06 Feb 2007 01:42 GMT
You can try catching the KeyDown event and select the row there if it
is the Enter that is pressed.

void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
   if (e.KeyCode == Keys.Enter)
   {
       this.dataGridView1.CurrentRow.Selected = true;
       e.Handled = true;
   }
}

==================
Clay Burch
Syncfusion, Inc.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.