PDA

Click to See Complete Forum and Search --> : datagrid - event doubleclick


escape0
Dec 5th, 2002, 05:07 AM
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

jkw119
Dec 5th, 2002, 10:13 AM
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
Dim currentrow As Long
currentrow = Me.DataGrid1.CurrentRowIndex
Me.DataGrid1.Select(currentrow)
End Sub

escape0
Dec 5th, 2002, 11:04 AM
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...