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 / .NET Framework / New Users / May 2005

Tip: Looking for answers? Try searching our database.

How do I create a mouse click event on a datagrid?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mac - 12 May 2005 08:25 GMT
Hi all,

I am new to VB.NET and what to activate some code when I double click on a
particular row in a datagrid.

Can you anyone tell me what event handle I need to use? Some sample code
would be appreciated.

regards,

Mac
Mac - 12 May 2005 08:39 GMT
Typical - as soon as I post I find it how to do it in the on-line help :)

This is the code I added:

   Private Sub sdg_details_dbl_click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles sdg_details.DoubleClick
       ' Add event handler code here.
       MsgBox("I have double cliked on datagrid", MsgBoxStyle.Information,
"Message Box")
   End Sub

But it only works when I dbl-click on the blank whitespace on the datagrid
or on the current row indicator column. Is it possible to have a double
click event on an actual cell? I have set my datagrid to read-only.

Mac

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.