DataGridView event arguments
-
Hi, This question may be a bit silly, but I still can't figure it out: When entering a DataGridView DoubleClick event handler function (DataGridView1_DoubleClick(object sender, EventArgs e), e only has basic methods (Equals(), ToString() etc.). However, at run time, e also have a 'Location' field, which I need. If I try to compile a code contains e.Location, it won't compile... At google I found people that use e.RowIndex, but I don't have that one either... Please help. Thanks!
-
Hi, This question may be a bit silly, but I still can't figure it out: When entering a DataGridView DoubleClick event handler function (DataGridView1_DoubleClick(object sender, EventArgs e), e only has basic methods (Equals(), ToString() etc.). However, at run time, e also have a 'Location' field, which I need. If I try to compile a code contains e.Location, it won't compile... At google I found people that use e.RowIndex, but I don't have that one either... Please help. Thanks!
-
Hi, This question may be a bit silly, but I still can't figure it out: When entering a DataGridView DoubleClick event handler function (DataGridView1_DoubleClick(object sender, EventArgs e), e only has basic methods (Equals(), ToString() etc.). However, at run time, e also have a 'Location' field, which I need. If I try to compile a code contains e.Location, it won't compile... At google I found people that use e.RowIndex, but I don't have that one either... Please help. Thanks!
-
Hi, This question may be a bit silly, but I still can't figure it out: When entering a DataGridView DoubleClick event handler function (DataGridView1_DoubleClick(object sender, EventArgs e), e only has basic methods (Equals(), ToString() etc.). However, at run time, e also have a 'Location' field, which I need. If I try to compile a code contains e.Location, it won't compile... At google I found people that use e.RowIndex, but I don't have that one either... Please help. Thanks!
Hi, On double clicking on the grid, the event invoked is:
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
this gives RowIndex and ColumnIndex, whereas you will get e.location under the mouse click events, such as:
Private Sub DataGridView1_CellMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseDoubleClick
End Sub
Hope this helps.
Vinay ComponentOne LLC. www.componentone.com