DataGridView::HitTest Method (Int32, Int32)
.NET Framework (current version)
Returns location information, such as row and column indices, given x- and y-coordinates.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Return Value
Type: System.Windows.Forms::DataGridView::HitTestInfo^A DataGridView::HitTestInfo that contains the location information.
You can use this method to determine which part of the DataGridView control is located at the specified coordinates. For example, you can call this method—specifying the coordinates of a mouse click—to determine the row and column indexes of the clicked cell or whether a header cell or scroll bar was clicked.
.NET Framework
Available since 2.0
Available since 2.0
Show: