PC Review


Reply
Thread Tools Rate Thread

How do I handle the click event of a row in a standarddata grid ?

 
 
neil rowe
Guest
Posts: n/a
 
      8th Dec 2003
Hi all


How do I handle the click event of a row in a standard .net data grid on a
windows form ?

Regards


Neil


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      8th Dec 2003
Hi,

Private Sub DataGrid1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.Click

Dim pt As Point

Dim hti As DataGrid.HitTestInfo

pt = DataGrid1.PointToClient(Cursor.Position)

hti = DataGrid1.HitTest(pt)

If hti.Type = DataGrid.HitTestType.RowHeader Then

MessageBox.Show("Row header")

End If

End Sub



Ken
-----------------
"neil rowe" <(E-Mail Removed)> wrote in message
news:O%(E-Mail Removed)...
> Hi all
>
>
> How do I handle the click event of a row in a standard .net data grid on a
> windows form ?
>
> Regards
>
>
> Neil
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't handle click event on contextmenu item Jaime Lucci Microsoft VB .NET 0 8th Nov 2005 12:14 PM
Can VSTO handle a Picture click event in Excel? =?Utf-8?B?WXVob25n?= Microsoft Excel Programming 0 3rd Dec 2004 05:37 PM
how to handle DataGird-column-header-click EVENT newbie_csharp Microsoft C# .NET 0 29th Oct 2004 03:30 PM
Handle RadioButtonList click event by Clientscript =?Utf-8?B?c3Ryb3V0?= Microsoft ASP .NET 4 13th Oct 2004 12:14 AM
Can't handle Label click event Rafael Pivato Microsoft Dot NET Compact Framework 3 24th Oct 2003 02:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:57 PM.