Results 1 to 3 of 3

Thread: datagrid - event doubleclick

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    Austria
    Posts
    52

    datagrid - event doubleclick

    hi...

    i've problems with the datagrid-object of .net. the event doubleclick of the datagrid is not fired when i doubleclick on a cell... when i click on the gridlines (between two cells) the event is fired!

    my second problem is that i want to select the whole row when i click in a cell... same behavior as a click on the rowheader

    does anybody knowes how to do this?
    thanks
    robert

  2. #2
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256
    VB Code:
    1. Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
    2.         Dim currentrow As Long
    3.         currentrow = Me.DataGrid1.CurrentRowIndex
    4.         Me.DataGrid1.Select(currentrow)
    5. End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    Austria
    Posts
    52
    thank you... that works!!!

    i understand what the procedure makes (select the clicked row) but i cannot understand why also the doubleclick event now is correctly fired...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width